grunt-init

grunt-init template conditional copy files

两盒软妹~` 提交于 2019-12-11 03:16:13
问题 I've just started using grunt-init. I have everything working. And I was wondering if there is a way to do conditional copy root files based on prompts which based on answers to previous prompts. 回答1: You can make use of the rename.json file via the docs. The prop should be the path to the file you want to copy/not copy, and the value can be a template string with a conditional. For example, let's say you had two different main.js files, one empty and one with code you tend to re-use: { "app