-
Notifications
You must be signed in to change notification settings - Fork 29
/
gulpfile.js
53 lines (42 loc) · 1.17 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
var gulp = require('gulp');
var shell = require('gulp-shell');
gulp.task('server', shell.task([
'jekyll serve --no-watch'
]));
gulp.task('serve', shell.task([
'jekyll build -I --limit_posts 1'
]));
gulp.task('serve-watch', ['js'], shell.task([
'jekyll build -I --limit_posts 1'
]));
gulp.task('js', shell.task([
'webpack'
]));
gulp.task('sass-watch', shell.task([
'sass _sass/style.scss:_site/css/main.css --sourcemap=inline --scss --style=nested'
]));
gulp.task('sass', ['serve-watch'], shell.task([
'sass _sass/style.scss:_site/css/main.css --sourcemap=inline --scss --style=nested'
]));
gulp.task('watch', function () {
gulp.watch([
'scripts/api-explorer/v2/src/**/*.js',
'scripts/api-explorer/v2/**/*.json'
], ['serve-watch']);
gulp.watch([
'_sass/**/*.scss'
], ['sass-watch']);
gulp.watch([
'_includes/**/*.html',
'_layouts/**/*.html',
'*/**/*.md',
'scripts/pages/**/*.js'
], ['serve-watch']);
});
gulp.task('prod', shell.task([
'npm run build',
'rm -rf _site/css/main.css.map',
'sass _sass/style.scss:_site/css/main.css --scss --style=compressed'
]));
gulp.task('revers', ['js', 'serve-watch', 'sass-watch']);
gulp.task('default', ['server', 'watch']);