-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathgulpfile.js
More file actions
28 lines (23 loc) · 688 Bytes
/
gulpfile.js
File metadata and controls
28 lines (23 loc) · 688 Bytes
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
const {src, dest, series} = require('gulp');
const del = require('del');
const zip = require('gulp-zip');
const extensionName = 'Open-New-Tab-After-Current-Tab';
async function clean() {
await del(['build']);
await Promise.resolve();
}
function build() {
return src('src/**')
.pipe(dest('build'));
}
function dist() {
const manifest = require('./src/manifest.json');
const distFileName = extensionName + '_v' + manifest.version + '.zip';
return src('build/**')
.pipe(zip(distFileName))
.pipe(dest('dist'));
}
exports.clean = clean;
exports.build = series(clean, build);
exports.dist = series(clean, build, dist);
exports.default = series(clean, build, dist);