Code Monkey home page Code Monkey logo

Comments (6)

ben-rogerson avatar ben-rogerson commented on July 18, 2024 1

Yeah you're right, it'll be more complex to deal with the issues around combining the configs.
Going with separate config files means the 'multiple configs' feature could be optional.

For the time being you could try automating the config swap.
Maybe you could use a package.json script like this?

"scripts": {
    "swapconfig": "mv swiff.config.js tmp && mv swiff.secondary.js swiff.config.js && mv tmp swiff.secondary.js"
  },

from swiff.

ben-rogerson avatar ben-rogerson commented on July 18, 2024

I agree - configuring Swiff for additional environments would be genuinely useful.
I'll look into adding this, thanks for the idea

from swiff.

ben-rogerson avatar ben-rogerson commented on July 18, 2024

For the time being Swiff is focussed on "Local <> Staging server" functionality so closing this for now.

from swiff.

chasegiunta avatar chasegiunta commented on July 18, 2024

@ben-rogerson Wondering, if in the interim, a cli param could be added to designate a config file?

Such as
swiff --config staging.swiff.js
swiff --config production.swiff.js
(config file could be named whatever, as long as it's parsable by swiff)

We currently have multiple config files & renaming.

from swiff.

ben-rogerson avatar ben-rogerson commented on July 18, 2024

@chasegiunta I'm thinking multiple configs would be a great feature for the release after next.
Here's some thoughts:

  • I'd like to specify the config via flags and/or the interface
  • Config file naming should be enforced: swiff.[staging/production/etc].js
  • The flag to specify a config could be: swiff --config staging or swiff staging
  • I'd need to display the current loaded config in the interface
  • A new options screen to switch configs would be needed
  • A reference to the last used config could be stored

Let me know what you think

from swiff.

chasegiunta avatar chasegiunta commented on July 18, 2024

@ben-rogerson The additional config files were simply a workaround. I don't think, long-term, it would make sense for a config file per environment. My guess would be that placing them in one file massively complicates things with how everything is currently being done, though.

Understandably, if it's too much work right now for a feature you personally may not even use, what you've suggested sounds great.

from swiff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.