Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt option without the variable name

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?

like image 332
Lightheaded Avatar asked Feb 18 '15 11:02

Lightheaded


1 Answers

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.

like image 95
meilke Avatar answered Nov 19 '22 06:11

meilke