-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
54 lines (43 loc) · 1.16 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
49
50
51
52
53
54
//Gulp.js configuration
//include gulp and plugins
var gulp = require('gulp'),
//gulp newer dependency to check and make sure there's a change before copying the files over again
newer = require('gulp-newer');
//file locations
var dest = '/dist';
//making object variables for html file locations
html = {
in: source = 'html/index.html',
out: dest = 'dist/'
};
//making object variables for html file locations
css = {
in: source = 'css/index.css',
out: dest = 'dist/'
};
//making object variables for html file locations
js = {
in: source = 'js/index.js',
out: dest = 'dist/'
};
//making task to copy the html files
gulp.task('copyhtml', function(){
return gulp.src(html.in)
.pipe(newer(html.out))
.pipe(gulp.dest(html.out));
});
//making a task to copy the css files
gulp.task('copycss', function(){
return gulp.src(css.in)
.pipe(newer(css.out))
.pipe(gulp.dest(css.out));
});
//making a task to copy the js files
gulp.task('copyjs', function(){
return gulp.src(js.in)
.pipe(newer(js.out))
.pipe(gulp.dest(js.out));
});
//default task for gulp
gulp.task('default', function(){
});