-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
28 lines (26 loc) · 818 Bytes
/
app.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
const htmlStandards = require("reshape-standard");
const cssStandards = require("spike-css-standards");
const jsStandards = require("spike-js-standards");
const pageId = require("spike-page-id");
const sugarss = require("sugarss");
const env = process.env.NODE_ENV;
const locals = {};
require("dotenv").config();
module.exports = {
devtool: "source-map",
matchers: { html: "*(**/)*.html", css: "*(**/)*.sss" },
ignore: ["**/layout.html", "**/_*", "**/.*", "readme.md", "yarn.lock"],
plugins: [],
reshape: htmlStandards({
locals: ctx => {
return Object.assign(locals, { pageId: pageId(ctx) });
},
minify: env === "production"
}),
postcss: cssStandards({
parser: sugarss,
minify: env === "production",
warnForDuplicates: env !== "production"
}),
babel: jsStandards()
};