forked from codestates/re-collect-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
22 lines (19 loc) Β· 815 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var gulp = require("gulp");
var sass = require("gulp-sass")(require("sass"));
var concat = require("gulp-concat");
var sourcemaps = require("gulp-sourcemaps");
var browserSync = require("browser-sync").create();
gulp.task("sass", () => {
return gulp
.src("./src/scss/*.scss") // μ
λ ₯ κ²½λ‘
.pipe(sourcemaps.init())
.pipe(sass({sourceComments: true}).on('error', sass.logError))//true μ€μ
.pipe(concat('App.css'))
.pipe(sourcemaps.write('../maps'))//μ μ maps λλ ν 리 μμ±
.pipe(gulp.dest('./src')); // μΆλ ₯ κ²½λ‘
});
// λ°νμ μ€ νμΌ κ°μ
gulp.task('sass:watch', function () {
gulp.watch('./src/scss/*.scss', gulp.series('sass')); // μ
λ ₯ κ²½λ‘μ νμΌ λ³κ²½ κ°μ§ μ μ€νν Actions(Task Name)
});
gulp.task('default', gulp.series('sass:watch'));