[英]How can I configure my Grunt.js file to copy a directory without a particular subdirectory during the build?
Given that the Gruntfile is located in parent/aurora/Gruntfile.js, 假设Gruntfile位于parent / aurora / Gruntfile.js中,
I'd like to configure Grunt to do the following when the build command is executed: 我想配置Grunt在执行build命令时执行以下操作:
https://github.com/antonpug/aurora/blob/master/Gruntfile.js https://github.com/antonpug/aurora/blob/master/Gruntfile.js
If you don't want to copy files or a directory you can just preface the files you don't want to include with !
如果您不想复制文件或目录,则可以为不想包含的文件添加前缀
!
. 。 For example, if you don't want to copy a directory just use:
!/parent/aurora/node_modules/**
. 例如,如果您不想复制目录,请使用:
!/parent/aurora/node_modules/**
。
In your grunt task: 在您艰苦的任务中:
files: [
{
src: ['your_files', '!/parent/aurora/node_modules/**'],
dest: 'output/folder'
}
]
Hope this helps! 希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.