UNPKG

1.05 kBPlain TextView Raw
1
2/// Proposed API to preserve composability
3// const {create, series, parallel, createGulpfile} = require("@pendulum/gulp-tools");
4
5const build = create([
6 clean(src, dest),
7 parallel(
8 ...copy({
9 static: ["./src/static/**/*", dist],
10 php: ["./src/php/**/*", dist],
11 vendor: [["./vendor/**/*.php", "./vendor/.htaccess"], dist + "/vendor"]
12 }),
13 sass(src, dest),
14 [ // Array is series by default
15 ts(src, dest),
16 parallel(
17 rollup(src, dest),
18 declarations(src, dest) // Or copy() ?
19 ),
20 clean({tsClean: [src, dest]})
21 // Also shortcut?
22 // tsAndRollup({
23 // src, dest, declarations: boolean, temp /* temp directory */
24 // })
25 ]
26 )
27]) // Generates watchers and registers them
28
29const deploy; // = deploy(src, dest) or copy({deploy: [src, dest]})
30const serve;
31const watch = startWatchers();
32
33const serveAndWatch = create(build, deploy, serve, watch);
34