出于某种原因,我的wiredep 配置正在获取我的bower js 文件,而不是css。
这是我的 gulpfile:
gulp.task('wiredep', function(){
var options = config.getWiredepDefaultOptions();
var wiredep = require('wiredep').stream;
return gulp
.src(config.index)
.pipe($.using())
.pipe(wiredep(options))
.pipe($.inject(gulp.src(config.js)))
.pipe(gulp.dest(config.layout))
});
这是我的 bower.json
{
"name": "//",
"version": "0.0.0",
"homepage": "//",
"authors": [
"//"
],
"description": "//",
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"public/vendor",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.1.4",
"toastr": "~2.1.1",
"angular": "~1.4.1",
"angular-resource": "~1.4.1",
"angular-route": "~1.4.1",
"bootstrap": "~3.3.5",
"angular-mocks": "~1.4.1"
}
}
我正在使用 Jade 作为模板,JS 正在通过,但 css 没有。
doctype
html
head
//bower:css
//endbower
base(href="/")
body(ng-app='app')
include currentUser
block main-content
//bower:js
script(src='/vendor/jquery/dist/jquery.js')
script(src='/vendor/toastr/toastr.js')
script(src='/vendor/angular/angular.js')
script(src='/vendor/angular-resource/angular-resource.js')
script(src='/vendor/angular-route/angular-route.js')
script(src='/vendor/bootstrap/dist/js/bootstrap.js')
script(src='/vendor/angular-mocks/angular-mocks.js')
//endbower