You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
622 B

  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. });