gulpfile.js 475 B

12345678910111213141516171819202122
  1. 'use strict';
  2. const gulp = require('gulp');
  3. const sass = require('gulp-sass');
  4. const nodemon = require('gulp-nodemon');
  5. gulp.task('sass', () => {
  6. return gulp.src('./src/sass/**/*.scss')
  7. .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
  8. .pipe(gulp.dest('./public/css'));
  9. });
  10. gulp.task('start', () => {
  11. nodemon({
  12. script: 'src/app.js',
  13. ext: 'js'
  14. });
  15. });
  16. gulp.task('default', ['start'], () => {
  17. gulp.watch('./src/sass/**/*.scss', ['sass']);
  18. });