簡體   English   中英

有沒有辦法將所有腳本從Bower組件復制到grunt中的dist / script文件夾而無需縮小?

[英]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.jsdist/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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM