Answer the question
In order to leave comments, you need to log in
What to do if .css is missing in "main" in bower.json (when working with bower + wiredep)?
I use gulp, bower + wiredep:
<!-- bower:css -->
...
<!-- endbower -->
"less/font-awesome.scss"
"sass/font-awesome.sass"
"css/font-awesome.css"
var gulp = require('gulp');
concatCSS = require('gulp-concat-css');
minifyCSS = require('gulp-minify-css');
rename = require('gulp-rename');
prefix = require('gulp-autoprefixer');
sass = require('gulp-sass');
uncss = require('gulp-uncss');
wiredep = require('wiredep').stream;
browserSync = require('browser-sync').create();
reload = browserSync.reload;
gulp.task('default', function() {
return gulp.src('sass/*.sass')
.pipe(sass())
/*.pipe(concatCSS("bundle.css"))
.pipe(prefix("last 30 versions"))
.pipe(minifyCSS(""))
.pipe(rename("bundle.min.css"))
.pipe(uncss({
html: ['index.html']
}))*/
.pipe(gulp.dest('app/'));
});
gulp.task('browser-sync', function() {
browserSync.init({
server: {
baseDir: "./app"
}
});
gulp.watch("app/*.html").on("change", browserSync.reload);
gulp.watch('sass/*.sass', ['default'])
gulp.watch("app/*.css").on("change", browserSync.reload);
});
gulp.task('bower', function () {
gulp.src('./app/index.html')
.pipe(wiredep({
directory: 'app/libs'
}))
.pipe(gulp.dest('./app'));
})
gulp.task('watch', function () {
gulp.watch('bower.json', ['bower'])
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question