如何配置我Gruntfile运行bower组件的构建脚本?
一个问题是每个组件可能有不同的构建命令,例如D3使用a Makefile,所以我需要运行make,而angular.js也使用grunt并且需要运行grunt build.
有人能指出我的一个例子吗?
应该建立凉亭组件.
否则用户将处于您所处的确切状态.我知道目前许多组件都没有,但我们无能为力.
您可以使用grunt-shell轻松执行您需要的任何构建脚本:
grunt.initConfig({
shell: {
d3: {
command: 'make',
options: {
execOptions: {
cwd: 'components/d3'
}
}
},
angular: {
command: 'grunt',
options: {
execOptions: {
cwd: 'components/angular'
}
}
}
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7618 次 |
| 最近记录: |