-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
48 lines (35 loc) · 1.06 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
var gulp = require('gulp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync').create();
// The basic syntax of a gulp task is:
// gulp.task('task-name', function() {
// // stuff here
// })
gulp.task('test', function(){
console.log('this is only a test');
});
// Here's what a real task may look like
// gulp.task('task-name', function () {
// return gulp.src('source-files') // Get source files with gulp.src
// .pipe(aGulpPlugin()) // Sends it through a gulp plugin
// .pipe(gulp.dest('destination')) // Outputs the file in the destination folder
// })
gulp.task('sass', function(){
return gulp.src('scss/*.scss')
.pipe(sass())
.pipe(gulp.dest('css'))
});
// Gulp watch syntax
// gulp.watch('files-to-watch', ['tasks', 'to', 'run']);
// EX: gulp.watch('scss/*.scss', ['sass']);
// we can group together multiple watch processes into a watch task
gulp.task('watch', function(){
gulp.watch('scss/*.scss', ['sass']);
})
gulp.task('browserSync', function(){
browserSync.init({
server: {
baseDir: './'
},
})
})