gulpfile.js 622 B

123456789101112131415161718192021222324252627
  1. var gulp = require('gulp');
  2. var sass = require('gulp-sass');
  3. var cleanCss = require('gulp-clean-css');
  4. var rename = require('gulp-rename');
  5. var paths = {
  6. sass: ['./scss/**/*.scss']
  7. };
  8. gulp.task('default', ['sass']);
  9. gulp.task('sass', function(done) {
  10. gulp.src('./scss/ionic.app.scss')
  11. .pipe(sass())
  12. .on('error', sass.logError)
  13. .pipe(gulp.dest('./www/css/'))
  14. .pipe(cleanCss({
  15. keepSpecialComments: 0
  16. }))
  17. .pipe(rename({ extname: '.min.css' }))
  18. .pipe(gulp.dest('./www/css/'))
  19. .on('end', done);
  20. });
  21. gulp.task('watch', ['sass'], function() {
  22. gulp.watch(paths.sass, ['sass']);
  23. });