2



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')
4

1 回答 1

3

我所需要的只是

.pipe(wiredep({
  ignorePath: '../'
}))
于 2014-10-22T19:46:39.437 回答