gulpbowerwiredep

gulp wiredep- ignorePath not working


My .bowerrc has this "directory": "./public/bower_components/"

I am successfully injecting html, but I am getting unwanted path prefix, '../../public/':

<script src="../../public/bower_components/jquery/dist/jquery.js"></script>
<script src="../../public/bower_components/underscore/underscore.js"></script>
<script src="../../public/bower_components/angular/angular.js"></script>
<script src="../../public/bower_components/typeahead.js/dist/typeahead.bundle.js"></script>
<script src="../../public/bower_components/angular-file-upload-shim/angular-file-upload-shim.js"></script>
<script src="../../public/bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="../../public/bower_components/angular-animate/angular-animate.js"></script>

My gulp task looks like this:

gulp.task('wiredep', function() {
   var options = config.getWiredepDefaultOptions();
   var wiredep = require('wiredep').stream;

   return gulp
         .src(config.index)
         .pipe(wiredep(options))
         .pipe($.inject(gulp.src(config.clientjs), {ignorePath: '/public/'}))
         .pipe(gulp.dest('./build/'));
});

My wiredep options look like this:

  bowerJson: require('./bower.json'),
  directory: './public/bower_components/',
  ignorePath: '../../public/'

According to the wiredep docs, it has an ignorePath options property that I can pass that will be ignored from the injected path. I can't find out what seems to be the problem. Any ideas?


Solution

  • Had a typo in my gulp.config.js so that my options weren't loading correctly