Wal*_*ter 2 node.js gruntjs sails.js
我正在使用凉亭进行资产管理.Bootstrap bower repo随附了一个Gruntfile.js.
有没有办法从链接器中排除它?
我试过了:
var jsFilesToInject = [
'!**Gruntfile.js',
// ...
]
Run Code Online (Sandbox Code Playgroud)
但它不起作用 - 我把这个字符串放在错误的位置吗?


PS我按照本指南来到这里:StackOverFlow问题并运行bower install bootstrap和bower install angular.
我的工作配置如下:
bower_components文件夹放一级,直接放在assets文件夹中.将所有与应用相关的文件放在linker文件夹中
| .bowerrc
| assets/
|-- bower_components/
|---- bootstrap/
|------ dist/
|-------- bootstrap.js
|---- angular/
|-- linker/
|---- js/
|------ sails.io.js
|------ socket.io.js
|---- styles/
|---- templates/
Run Code Online (Sandbox Code Playgroud)你Gruntfile.js有这样的jsFileToInject设置
var jsFilesToInject = [
// Below, as a demonstration, you'll see the built-in dependencies
// linked in the proper order order
// Bring in the socket.io client
'linker/js/socket.io.js',
// then beef it up with some convenience logic for talking to Sails.js
'linker/js/sails.io.js',
// jQuery and plugins
'bower_components/jquery/jquery.js',
// Bootstrap
'bower_components/bootstrap/dist/bootstrap.js',
// Angular
'bower_components/angular/angular.js',
// App file that needs to load first
'linker/js/app.js',
// All of the rest of your app scripts imported here
'linker/**/*.js'
];
Run Code Online (Sandbox Code Playgroud)
在.bowerrc你的项目的根源,你放
{
"directory": "assets/bower_components"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1373 次 |
| 最近记录: |