-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
54 lines (47 loc) · 1.52 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 ghPages = require('gulp-gh-pages');
var shell = require('gulp-shell');
var task = require('shell-task');
var wiki = require('./package.json').repository.wiki;
var repogitbook = require('./package.json').repogitbook;
gulp.task('deploy', function() {
return gulp.src('./txt/**/*')
.pipe(ghPages());
});
gulp.task('wiki', function() {
return gulp.src('').pipe(shell(['./scripts/losh generate-wiki']));
});
gulp.task('deploygh', function() {
return gulp.src('').pipe(shell(['node ./scripts/deploy-gh-pages']))
});
gulp.task('build', function() {
return gulp.src('').pipe(shell(['sudo gitbook build ./txt ./gh-pages']));
});
gulp.task('buildwiki', function() {
return gulp.src('').pipe(shell(['node ./scripts/generate-wiki.js']));
});
gulp.task('deploywiki', function() {
return gulp.src('').pipe(shell([
'cd wiki',
'rm -rf .git',
'git init',
'git add .',
'git commit -m "Deploy to Wiki"',
'git remote add wiki https://github.com/ULL-ESIT-PL-1617/primeros-pasos-en-nodejs-tpka.wiki.git',
'git push wiki master --force'
]));
});
gulp.task('serve', function() {
return gulp.src('').pipe(shell(['sudo node hello.js']));
});
gulp.task('deploygb', function() {
return gulp.src('').pipe(shell(['node ./scripts/deploy-gitbook.js']));
});
/*
gulp.task('deploygb', function() {
return gulp.src('').pipe(shell([
'git add txt',
'git commit -m "Deploy in Gitbook"',
'git push ' + repogitbook.pedro + " --force"
]));
});*/