forked from Jillzz93/MSN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (29 loc) · 1022 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//gulpfile.js
var gulp = require('gulp');
var sass = require('gulp-sass');
// Define tasks after requiring dependencies
function style() {
// Where should gulp look for the sass files?
// My .sass files are stored in the styles folder
// (If you want to use scss files, simply look for *.scss files instead)
return (
gulp
.src("sass/stylesheet.scss")
// Use sass with the files found, and log any errors
.pipe(sass())
.on("error", sass.logError)
// What is the destination for the compiled file?
.pipe(gulp.dest("css/"))
);
}
// Expose the task by exporting it
// This allows you to run it from the commandline using
// $ gulp style
exports.style = style;
function watch(){
// gulp.watch takes in the location of the files to watch for changes
// and the name of the function we want to run on change
gulp.watch('sass/stylesheet.scss', style)
}
// Don't forget to expose the task!
exports.watch = watch;