hi , any tutorial or sample on how to use Grunt-UnCss with Ionic Project ?
Nothing yet, but it should be fairly easy to use.
First you would want to use gulp-uncss
https://www.npmjs.com/package/gulp-uncss
Then start to add it the sass task in ionic’s gulp file.
var uncss = require('gulp-uncss');
gulp.task('sass', function(done) {
gulp.src('./scss/ionic.app.scss')
.pipe(sass({
errLogToConsole: true
}))
.pipe(uncss({
html: ['www/**/*.html']
}))
.pipe(gulp.dest('./www/css/'))
.pipe(minifyCss({
keepSpecialComments: 0
}))
.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./www/css/'))
.on('end', done);
});
1 Like