Comments (6)
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.
I agree - configuring Swiff for additional environments would be genuinely useful.
I'll look into adding this, thanks for the idea
from swiff.
For the time being Swiff is focussed on "Local <> Staging server" functionality so closing this for now.
from swiff.
@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.
@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
orswiff 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.
@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)
- Add --host to the mysqldump param HOT 1
- Add support for encrypted ssh keys HOT 1
- Add support for pushing the database HOT 8
- Show database size after pulling from remote
- Add the ability to extend and add your own tasks HOT 1
- Change default colours? HOT 3
- Swiff doesn't exit after performing a database pull HOT 2
- Package yoga-layout-prebuilt throws exception when trying to run tasks from the command line. HOT 4
- Support DB_DSN for Craft 3.4+ Installs HOT 2
- Adding cli param to disable usage tracking HOT 1
- Where are backups stored? HOT 2
- Project.yaml push/pull HOT 1
- Database push command breaks receiving Craft CMS DB
- Add a working directory HOT 1
- Error: All configured authentication methods failed HOT 1
- Add customisable file ignores for push/pulls HOT 2
- I'm getting: "TypeError: ssh.dispose is not a function" HOT 5
- Support custom SSH port HOT 3
- Unsupported key format HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiff.