gulpfile在 'web'
目录结构中的 'web' bower_components 中:web
> app > jam > layout.jade (target)
使用:
gulp.task('wiredep', function () {
var wiredep = require('wiredep').stream;
gulp.src('app/styles/*.scss')
.pipe(wiredep())
.pipe(gulp.dest('app/styles'));
gulp.src('app/jade/*.jade')
.pipe(wiredep())
.pipe(gulp.dest('app/jade'));
});
我明白了
script(src='../../bower_components/jquery/dist/jquery.js')
在 layout.jade
当我需要时:
script(src='../bower_components/jquery/dist/jquery.js')