-
Notifications
You must be signed in to change notification settings - Fork 286
/
gulpfile.js
29 lines (26 loc) · 930 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
/* eslint-env node */
const gulp = require('gulp');
const zip = require('gulp-zip');
const del = require('del');
const pkg = require('./package.json');
let versionedPane = `panes-${pkg.emberVersionsSupported[0].replace(
/\./g,
'-',
)}`;
function compress(baseSrc, archiveName) {
return gulp
.src(`${baseSrc}/**/*`)
.pipe(zip(archiveName))
.pipe(gulp.dest('dist'));
}
exports['compress:chrome'] = () =>
compress('dist/chrome', 'chrome/ember-inspector.zip');
exports['compress:firefox'] = () =>
compress('dist/firefox', 'firefox/ember-inspector.zip');
exports['compress:chrome-pane'] = () =>
compress(`dist/chrome/${versionedPane}`, 'chrome.zip');
exports['compress:firefox-pane'] = () =>
compress(`dist/firefox/${versionedPane}`, 'firefox.zip');
exports['compress:bookmarklet-pane'] = () =>
compress(`dist/bookmarklet/${versionedPane}`, 'bookmarklet.zip');
exports['clean-tmp'] = () => del('./tmp');