I'd like to use grunt for deployment and type grunt deploy production
instead of grunt deploy --target=production
. As I don't have more parameters, I would like an option to just get the first parameter into a variable. Is it possible?
In many of my Grunt configurations I use https://github.com/lorenwest/node-config. Then deploying to production is this:
NODE_ENV=production grunt deploy
The deploy
task is generic, for instance regarding the target folder. The production configuration is available from a dedicated file, for instance production.json
, and would hold that folder name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With