-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
57 lines (47 loc) · 1.67 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
/*
[~/GitBook/Library/casianorodriguezleon/plantilla-tfg-ull(master)]$ git remote -v
origin https://git.gitbook.com/casianorodriguezleon/plantilla-tfg-ull.git (fetch)
tfg https://github.com/ULL-ESIT-GRADOII-TFG/memoria-tfg-markdown-gitbook.git (fetch)
*/
const gulp = require('gulp');
const shell = require('gulp-shell');
const opn = require('opn');
gulp.task('default', ['deploy']);
gulp.task('build', shell.task([ // gitbook destroys everything in the _book directory!
'gitbook build', // build HTML in _book
],
{ verbose: true }
)
);
gulp.task('deploy', ['build'], shell.task(
[ 'git add . ',
'git ci -am "new version"', // commit changes
//'git push --force origin master' // push changes to gitbook repo
'git push origin master' // push changes to github repo
]
)
);
gulp.task('deploygb', shell.task(
'git push gitbook master', // push changes to gitbook repo
)
);
gulp.task('browse', shell.task( // Open a browser in the github book repo
'hub browse ULL-ESIT-DSI-1819/ull-esit-dsi-1819-github.io'
));
gulp.task('apuntes', function() {
return opn('https://ull-esit-dsi-1819.github.io/_book/');
} // Open web browser in the github deployment of this book
);
gulp.task("pre-install", shell.task([ // global dependencies
"npm i -g gitbook-cli",
"brew install hub"
]));
gulp.task("push", shell.task([ // push to github not to gitbook
'git ci -am "new version" && git push origin master',
]));
gulp.task('serve', shell.task([ // gitbook destroys everything in the _book directory!
'gitbook serve', // build HTML in _book
],
{ verbose: true }
)
);