-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
38 lines (31 loc) · 918 Bytes
/
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
// grab our gulp packages
const gulp = require('gulp'),
exec = require('child_process').exec,
zip = require('gulp-zip'),
bump = require('gulp-bump'),
merge = require('merge-stream');
gulp.task('default', ['watch']);
gulp.task('watch', function() {
gulp.watch('src/**/*.js', ['uri']);
});
gulp.task('uri', function(){
exec('chrome-cli open "http://reload.extensions"', function() {
setTimeout(function() {
exec('chrome-cli close');
}, 1000);
});
});
gulp.task('bump', function() {
var packageBump = gulp.src('./package.json')
.pipe(bump({type:'patch'}))
.pipe(gulp.dest('./'));
var manifestBump = gulp.src('./src/manifest.json')
.pipe(bump({type:'patch'}))
.pipe(gulp.dest('./src'));
return merge(packageBump, manifestBump);
});
gulp.task('deploy', ['bump'], function(){
gulp.src('src/**/**')
.pipe(zip('archive.zip'))
.pipe(gulp.dest('dist'));
});