-
Notifications
You must be signed in to change notification settings - Fork 8
/
gulpfile.js
46 lines (40 loc) · 915 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
45
46
var fs = require('fs');
var del = require('del');
var gulp = require('gulp');
// Common pathes
var path = {
docs: './docs/**/*.*',
engine: './engine/*.json',
schema: './schema/*.json',
dest: './build'
};
// Clean output
gulp.task('clean', function () {
return del([
path.dest + '/**/*',
]);
});
// Copy static files
gulp.task('static', function () {
return gulp
.src([path.docs], {base: 'docs'})
.pipe(gulp.dest(path.dest));
});
// Copy static files
gulp.task('engine', function () {
return gulp
.src([path.engine], {base: 'engine'})
.pipe(gulp.dest(path.dest + '/engine'));
});
// Copy static files
gulp.task('schema', function () {
return gulp
.src([path.schema], {base: 'schema'})
.pipe(gulp.dest(path.dest + '/schema'));
});
// The default task (called when you run `gulp` from cli)
gulp.task('default', [
'static',
'engine',
'schema',
]);