2014-03-31 35 views
1

我使用由yeoman角發生器生成的grunt文件。有多個文件需要涼亭,安裝,更新,配置的安裝涼亭現在就像是如何使用grunt-bower-install更新多個html文件

// Automatically inject Bower components into the app 
'bower-install': { 
    app: { 
    html: '<%= yeoman.app %>/index.html', 
    ignorePath: '<%= yeoman.app %>/' 
    } 
}, 

我試圖用

html: ['<%= yeoman.app %>/index.html','<%= yeoman.app %>/manager.html'] 

和運行grunt bower-install的時候,我得到了以下錯誤

Running "bower-install:app" (bower-install) task 
Warning: path must be a string Use --force to continue. 

Aborted due to warnings. 

bower-install插件版本爲

"grunt-bower-install": "~0.7.0", 

而我的問題是這個版本是否支持更新多個html文件?如果是,如何?

回答

2

可以定義多個目標,以更新多個HTML文件是這樣的:

'bower-install': { 
    app: { 
    html: '<%= yeoman.app %>/index.html', 
    ignorePath: '<%= yeoman.app %>/' 
    }, 
    app2: { 
    html: '<%= yeoman.app %>/manager.html', 
    ignorePath: '<%= yeoman.app %>/' 
    } 
} 
相關問題