-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
45 lines (40 loc) · 1.05 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
var gulp = require('gulp');
var shell = require('gulp-shell');
gulp.task('default', shell.task([
'echo',
'echo COMMANDS LIST :',
'echo - build : Prepare the project to be pushed on the server',
'echo - push : Push the project on the server',
'echo - deploy : Build then push the project on the server',
'echo'
]));
gulp.task('build', shell.task([
'echo',
'echo Building the project into ./dist ...',
'echo',
'rsync -avz --progress --exclude-from "exclude-list-gulp.txt" ./ dist/',
'echo',
'echo Building finished',
'echo'
]));
gulp.task('push', shell.task([
'echo',
'echo Deploying the project on the server ...',
'echo',
'scp -r dist/* [email protected]:/var/www/html/wfp-alexa',
'echo',
'echo Push finished',
'echo',
]));
gulp.task('deploy', ['build'], function() {
gulp.run('push');
shell.task([
'echo',
'echo Deleting the build file',
'echo',
'rm -rf dist/',
'echo',
'echo Deployment finished',
'echo',
]);
});