我使用的是由约曼角发生器生成的咕噜文件。有多个文件需要bower-install更新,bower-install配置现在如下
// 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文件吗?如果是,怎么做?
发布于 2014-04-07 14:48:11
您可以定义多个目标来更新多个html文件,如下所示:
'bower-install': {
app: {
html: '<%= yeoman.app %>/index.html',
ignorePath: '<%= yeoman.app %>/'
},
app2: {
html: '<%= yeoman.app %>/manager.html',
ignorePath: '<%= yeoman.app %>/'
}
}发布于 2014-04-23 06:25:04
看起来最新的版本使用了一种更加灵活的方式来锁定文件.
https://github.com/stephenplusplus/grunt-bower-install
target: {
...
src: [
'app/views/**/*.html',
...https://stackoverflow.com/questions/22761001
复制相似问题