-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
40 lines (32 loc) · 1.03 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
var gulp = require('gulp'),
gp_concat = require('gulp-concat'),
gp_rename = require('gulp-rename'),
gp_uglify = require('gulp-uglify'),
watch = require('gulp-watch');
var deploy = require('gulp-gh-pages');
var destination_path = 'dist/',
js_path = 'js/*.min.js';
gulp.task('concat', function(){
return gulp.src(js_path)
.pipe(gp_concat('app.js'))
.pipe(gulp.dest(destination_path))
});
gulp.task('minify',function(){
return gulp.src('js/scripts.js')
.pipe(gp_rename('scripts.min.js'))
.pipe(gp_uglify())
.pipe(gulp.dest('js/'));
});
gulp.task('watch', function() {
gulp.watch(js_path, gulp.series('default'));
});
//gulp.task('default',gulp.parallel(['concat','minify']));
gulp.task('default',gulp.parallel(['concat','minify','watch']));
/**
* Push build to gh-pages
*/
gulp.task('deploy', function () {
return gulp.src("./dist/**/*")
.pipe(deploy({remoteUrl: 'https://github.com/arthurnovello/site-fablab-maua',
branch: 'master'}));
});