|
1 | | -"use strict"; |
| 1 | +'use strict'; |
2 | 2 |
|
3 | 3 | // 필요한 모듈선언 |
4 | | -const gulp = require("gulp"); |
5 | | -const sass = require("gulp-sass"); |
6 | | -const plumber = require("gulp-plumber"); |
7 | | -const notify = require("gulp-notify"); |
| 4 | +const gulp = require('gulp'); |
| 5 | +const sass = require('gulp-sass'); |
| 6 | +const plumber = require('gulp-plumber'); |
| 7 | +const notify = require('gulp-notify'); |
8 | 8 |
|
9 | 9 | function errorAlert(error) { |
10 | 10 | notify.onError({ |
11 | | - title: "Gulp Error", |
12 | | - message: "Check your terminal", |
13 | | - sound: "Purr" |
| 11 | + title: 'Gulp Error', |
| 12 | + message: 'Check your terminal', |
| 13 | + sound: 'Purr', |
14 | 14 | })(error); //Error Notification |
15 | 15 | console.log(error.toString()); //Prints Error to Console |
16 | | - this.emit("end"); //End function |
| 16 | + this.emit('end'); //End function |
17 | 17 | } |
18 | 18 |
|
19 | 19 | /** |
20 | 20 | * watch |
21 | 21 | */ |
22 | | -gulp.task("scss-watch", function() { |
23 | | - gulp.watch(["./static/scss/**/*.scss"], ["scss"]); |
| 22 | +gulp.task('scss-watch', function() { |
| 23 | + gulp.watch(['./static/scss/**/*.scss'], ['scss']); |
24 | 24 | }); |
25 | 25 |
|
26 | 26 | /** |
27 | 27 | * SASS |
28 | 28 | */ |
29 | | -gulp.task("scss", function() { |
| 29 | +gulp.task('scss', function() { |
30 | 30 | gulp |
31 | | - .src("static/scss/custom.scss") |
32 | | - .pipe(plumber({ errorHandler: errorAlert })) |
33 | | - .pipe(sass({ outputStyle: "compressed" })) |
34 | | - .pipe(gulp.dest("./static/css")); |
| 31 | + .src('static/scss/custom.scss') |
| 32 | + .pipe(plumber({errorHandler: errorAlert})) |
| 33 | + .pipe(sass({outputStyle: 'compressed'})) |
| 34 | + .pipe(gulp.dest('./static/css')); |
35 | 35 | }); |
36 | 36 |
|
37 | 37 | // 걸프 기본 타스크 |
38 | | -gulp.task("default", ["scss-watch"], function() { |
| 38 | +gulp.task('default', ['scss-watch'], function() { |
39 | 39 | return true; |
40 | 40 | }); |
0 commit comments