-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.ts
49 lines (38 loc) · 1.08 KB
/
gulpfile.ts
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
// Include gulp
var gulp = require('gulp');
var exec = require('child_process').exec;
const rename = require('gulp-rename');
gulp.task('build', function (cb) {
exec('cd apex && ng build -prod', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
var ncp = require('ncp').ncp;
ncp('apex/dist', "public", function (err) {
if (err) {
return console.error(err);
}
console.log('done!');
});
cb(err);
});
});
gulp.task('commit', (cb) => {
var argv = require('yargs').argv;
var commit = argv.c;
exec(`git add . -A && git commit -m '${commit}'`, function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp.task('push', ['commit'], (cb) => {
exec(`git push -u origin master`, function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp.task('publish', ['push'], function(cb) {
})
// Default Task
gulp.task('default', ['publish']);