-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
149 lines (123 loc) · 4.25 KB
/
gulpfile.js
File metadata and controls
149 lines (123 loc) · 4.25 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
var gulp = require('gulp');
var shell = require('gulp-shell');
var ghPages = require('gulp-gh-pages');
var path = require('path');
var run = require('gulp-run');
var cwd = process.cwd();
var paquete = require(process.cwd()+'/package.json');
//----------- Simplificación --------------------------------------
// Inclusión del Despliegue a gh-pages, problema :nothing to commit
// gulp.task('deploy', ['build-gitbook', 'empujar-libro', 'build-gitbook', 'empujar-gh'], function () {
// return gulp.src('').pipe(shell("./scripts/deploy-gitbook"));
// });
gulp.task('deploy', ['build-gitbook', 'empujar-libro'], function () {
return gulp.src('').pipe(shell("./scripts/deploy-gitbook"));
});
gulp.task('build-gitbook', function() {
return gulp.src('').pipe(shell('./scripts/generate-gitbook'));
});
gulp.task('wiki-deploy', ['wiki-build'], function() {
return gulp.src('').pipe(shell(['./scripts/deploy-wiki']));
});
gulp.task('wiki-build', function() {
return gulp.src('').pipe(shell(['./scripts/generate-wiki']));
});
gulp.task('empujar-libro',
shell.task("git add .; git commit -am 'desplegando a github_apuntes';"+
"git remote add repo_apuntes_no_tocar git@github.com:alu0100836059/Apuntes_SYTW.git;"+
"git push repo_apuntes_no_tocar master;",
// cambiar la coma de arriba por un + ,borrar esta línea y descomentar las de abajo
// ";"+
// "git push heroku master",
{ verbose: true }
)
);
// División de tareas para libro y gh
// gulp.task('empujar-gh',
// shell.task("cd gh-pages; git add .; git commit -m 'Despliegue gh';"+
// "git push repo_secundario gh-pages;",
// { verbose: true }
// )
// );
//-----------------------------------------------------------------
//-----------------------IAAS--------------------------------------
gulp.task('iaas',shell.task(['./scripts/ssh']));
// gulp.task('iaas', function(){
// return run(path.join(__dirname,'scripts','ssh')).exec();
// });
//-----------------------------------------------------------------
//empujar a gh-pages el directorio book
// gulp.task('deploy-gh-pages', function() {
// return gulp.src('./gh-pages/*')
// .pipe(ghPages());
// });
// "deploy-gitbook": "./scripts/losh deploy-gitbook",
// gulp.task('deploy', deploy-gh-pages);
////////////// viejo___
// gulp.task('deploy', ['empujar'], function () {
// return gulp.src('').pipe(shell(["./scripts/deploy-gitbook"]));
// });
// // "generate-gitbook": "./scripts/generate-gitbook",
// gulp.task('build', function() {
// return gulp.src(' ').pipe(shell(['./scripts/generate-gitbook']));
// });
//
// // Comentado Jacobo 19.10 problema autorización ?
// // gulp.task('deployWiki', function(){
// // return gulp.src('').pipe(shell(["./scripts/deploy-wiki"]));
// // });
//
// gulp.task('empujar', ['build'],
// shell.task(
// "git add ."+
// ";"+
// "git commit -am 'desplegando a github'"+
// ";"+
// "git push origin master",
// // cambiar la coma de arriba por un + ,borrar esta línea y descomentar las de abajo
// // ";"+
// // "git push heroku master",
// { verbose: true }
// )
// );
//
// Comentado el 18.10 por Jacobo error en let
// var deploygh = function() {
// "use strict";
// let gh = require('gh-pages');
//
// //process.env.CMDDESC="Deploy GitBook on Github";
//
// let json = require('./package.json');
// let REPO = json.repository.url;
// console.log( "Repositorio:"+REPO);
//
// gh.publish('./gh-pages', { repo: REPO, logger: function(m) { console.error(m); } });
// };
//creacion de pdf emobi y epub
gulp.task('creación-archivos',['pdf','mobi','epub']);
gulp.task('pdf',
shell.task(
"gitbook pdf ./txt",
{ verbose: true })
);
gulp.task('mobi',
shell.task(
"gitbook mobi",
{ verbose: true })
);
gulp.task('epub',
shell.task(
"gitbook epub",
{ verbose: true })
);
// npm install -g http-server
// NO BORRAR ESTE COMENTARIO
// https://git.heroku.com/herokuiaasfinal.git es la dirección de
// herokuiaasfinal, la del repo. En los settings de la aplicación
// en la página de heroku podemos ver el repositorio git al que
// responde nuestra aplicación. Sólo administrador
gulp.task("deploy-heroku-mongo", function () {
var heroku = require("gitbook-start-proyectofinal-noejaco17");
heroku.deploy();
});