[英]How to copy package.json to dist folder without the scripts part
[英]Is there any way to copy all the scripts from the bower components to dist/script folder in grunt without minification?
我已經與yeomean
有角度的計划。
在某些情況下,需要在build之后顯示我的角度項目中使用的所有腳本,但是在使用grunt build
命令之后,grunt會縮小所有腳本文件。
當我運行grunt build
命令時,是否可以將所有腳本文件從bower_components/some_module/some_script.js
到dist/scripts/some_scripts.js
?
有一種使用grunt的copy
任務的方法,如下所示:
copy: {
main: {
src: 'bower_coponents/some_module/some_script.js',
dest: 'dist/scripts/some_script.js',
},
}
但不知道如何從app/index.html
獲取所有腳本文件。
這種代碼的優點可以解決它在我的項目中的工作
copy: {
main: {
files: [
{expand: true, cwd: 'bower_coponents/some_module', src: ['**.js'], dest: 'dist/scripts/'},
],
},
},
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.