Lig*_*ded 7 arguments command-line-interface gruntjs
我想使用grunt进行部署和输入grunt deploy production而不是grunt deploy --target=production.由于我没有更多参数,我想选择将第一个参数放入变量中.可能吗?
在我的许多 Grunt 配置中,我使用https://github.com/lorenwest/node-config。然后部署到生产环境是这样的:
NODE_ENV=production grunt deploy
Run Code Online (Sandbox Code Playgroud)
该deploy任务是通用的,例如关于目标文件夹。生产配置可从专用文件(例如 )中获取production.json,并且将保存该文件夹名称。