There are several issues.
1st issue yeoman refers to gulp wiredep not gulp bower: rename gulp.task('bower', function ()
to{ gulp.task('wiredep', function () {
The second problem is that bower libs are not in directory: yeoman.app + '/bower_components'
, but in directory: 'bower_components'
,
The third issue is .pipe(gulp.dest(yeoman.app + '/views'));
not in the views folder, but.pipe(gulp.dest(yeoman.app ));
In short, replace gulp.task('bower', function ...
with:
gulp.task('wiredep', function () {
return gulp.src(paths.views.main)
.pipe(wiredep({
directory: 'bower_components',
ignorePath: '..'
}))
.pipe(gulp.dest(yeoman.app ));
});
Delete the dist folder, run gulp wiredep
, gulp
and gulp serve
or add the wiredep task to the assembly.
Hope this clarifies this.
source
share