-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
44 lines (35 loc) · 988 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
37
38
39
40
41
42
43
44
var gulp=require('gulp');
var browserSync = require('browser-sync').create();
gulp.task('styles',function() {
return gulp.src(
[
'node_modules/materialize-css/dist/css/materialize.css',
'style.css'
])
.pipe(gulp.dest("app/dist/css"))
.pipe(browserSync.stream());
}
)
gulp.task('scripts',function() {
return gulp.src(
[
'node_modules/jquery/dist/jquery.js',
'script.js',
'node_modules/materialize-css/dist/js/materialize.js'
])
.pipe(gulp.dest("app/dist/js"))
.pipe(browserSync.stream());
}
)
gulp.task('serve',['styles','scripts'],function(){
browserSync.init({
server:{
baseDir:"./app/"
}
});
gulp.watch("styles.css", ['styles']);
gulp.watch("index.js", ['scripts']);
gulp.watch("script.js", ['scripts']);
gulp.watch("app/*.html").on('change', browserSync.reload);
});
gulp.task('default', ['serve']);