S
S
sinout2015-08-29 18:32:13
Work organization
sinout, 2015-08-29 18:32:13

How to include individual files using wiredep?

Wiredep includes everything in the bower_components folder. How to connect only the necessary files from a folder for a certain page? For example, jquery and bootstrap are installed, by default wiredep will include jquery.js and bootstrap.js. How to remove boostrap.js and leave only jquery.js for a specific page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Yarosh, 2015-09-04
@sinout

If you read the docs , it becomes clear that there is an exclude option
that accepts strings and regular expressions.

var wiredep = require('wiredep').stream;

gulp.task('wiredepWIthoutJquery', function() {
  return gulp.src('index.html')
    .pipe(wiredep({
      exclude: [ /jquery/],
    }))
    .pipe(gulp.dest('./dest'));
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question