-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
61 lines (53 loc) · 1.39 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
55
56
57
58
59
60
61
//constants
const child = require('child_process');
const gulp = require('gulp');
const checkGem = require('gulp-check-gems');
const wait = require('gulp-wait');
const open = require('gulp-open');
//variables
const host = "0.0.0.0";
const port = 4096;
gulp.task('clean', function () {
const jekyll = child.spawn('bundle', ['exec', 'jekyll', 'clean'], {
stdio: 'inherit'
});
});
gulp.task('build', function () {
const jekyll = child.spawn('bundle', ['exec', 'jekyll', 'build', '--incremental'], {
stdio: 'inherit'
});
});
gulp.task('run', function () {
const jekyll = child.spawn('bundle', [
'exec',
'jekyll',
'serve',
'--incremental',
'--force_polling',
'--open-url',
'--host', host,
'--port', port
], {
stdio: 'inherit'
});
});
gulp.task('admin-run', function () {
const jekyll = child.spawn('bundle', [
'exec',
'jekyll',
'serve',
'--incremental',
'--force_polling',
'--open-url',
'--host', host,
'--port', port
], {
stdio: 'inherit'
});
});
gulp.task('admin-site', function () {
gulp.src(__filename)
.pipe(checkGem({gemfile: 'jekyll-admin'}, open({uri: 'http://' + host + ':' + port + '/admin'})));
});
gulp.task('admin', ['clean', 'admin-run', 'admin-site']);
gulp.task('default', ['clean', 'run']);