generated from MaybeThisIsRu/smix-eleventy-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.babel.js
42 lines (38 loc) · 1.14 KB
/
gulpfile.babel.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
39
40
41
42
// Gulp tasks
import { series, parallel } from "gulp";
import { clean } from "./gulp_tasks/operations.babel";
import { css, cssPurgeMin, cssWatcher } from "./gulp_tasks/css.babel";
import { js } from "./gulp_tasks/js.babel";
import { img, imgWatcher } from "./gulp_tasks/img.babel";
import { font, fontWatcher } from "./gulp_tasks/font.babel";
import { html } from "./gulp_tasks/html.babel";
import { eleventyBuild, eleventyWatch } from "./gulp_tasks/ssg.babel";
import subscriptionData from "./gulp_tasks/subscriptionData.babel";
// Public Tasks
const production = series(
subscriptionData,
eleventyBuild,
parallel(css, js, img, font),
cssPurgeMin,
html
);
const develop = series(
clean,
subscriptionData,
parallel(
eleventyWatch,
series(
parallel(css, js, img, font),
parallel(cssWatcher, imgWatcher, fontWatcher)
)
)
);
// Staging is used for Forestry CMS
// Builds assets once
// Watch for img changes
// Start SSG in watch mode with built-in server, ideally incremental building
const staging = series(
parallel(subscriptionData, css, js, img, font, html),
parallel(imgWatcher, eleventyWatch)
);
export { production, staging, develop };