anyone knows how include compass in compiling sass in ionic?
everytime ionic serve gives me error: [gulp-sass] file import not found or unreadable: compass
here's gulp task:
gulp.task('sass', function(done) { gulp.src('./scss/ionic.app.scss') .pipe(sass({ compass: true, errlogtoconsole: true })) .pipe(gulp.dest('./www/css/')) .pipe(minifycss({ keepspecialcomments: 0 })) .pipe(rename({ extname: '.min.css' })) .pipe(gulp.dest('./www/css/')) .on('end', done); }); i've done npm install -g gulp-compass still doesn't work.
thanks
if want use compass instead of sass, make sure have compass installed gem install sass
then install gulp-compass , replace sass in gulp pipe.
here's new config:
var compass = require('gulp-compass'); gulp.task('sass', function(done) { gulp.src('./scss/ionic.app.scss') .pipe(compass({ sass: 'scss', css: 'www/css' })) .pipe(gulp.dest('./www/css/')) .pipe(minifycss({ keepspecialcomments: 0 })) .pipe(rename({ extname: '.min.css' })) .pipe(gulp.dest('./www/css/')) .on('end', done); }); then always, import compass in sass stylesheets @import "compass";
Comments
Post a Comment