gulpfile在' web'
bower_components in' web'
目录结构:
web> app>玉> 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')
答案 0 :(得分:3)
我需要的只是
.pipe(wiredep({
ignorePath: '../'
}))