forked from Pe8er/Playbox.widget
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgulpfile.js
30 lines (24 loc) · 800 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
const { src, dest, watch, series, lastRun } = require("gulp");
const zip = require("gulp-zip");
const path = require("path");
const widgetLocation = `${process.env.HOME}/Library/Application Support/Übersicht/widgets`;
const buildDist = () => (
src("./UeberPlayer.widget/**/*", { since: lastRun(buildDist) })
.pipe(dest("./dist/UeberPlayer.widget"))
)
const makeZip = () => (
src("./UeberPlayer.widget/**")
.pipe(zip("UeberPlayer.widget.zip"))
.pipe(dest("./"))
)
const apply = () => (
buildDist()
.pipe(dest(path.join(widgetLocation, 'UeberPlayer.widget')))
)
const dev = () => {
watch('./UeberPlayer.widget/**/*', { ignoreInitial: false }, apply);
}
exports.default = buildDist;
exports.apply = apply;
exports.dev = dev;
exports.release = series(buildDist, makeZip);