-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
24 lines (23 loc) · 804 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
const htmlStandards = require('reshape-standard')
const cssStandards = require('spike-css-standards')
const jsStandards = require('spike-js-standards')
const pageId = require('spike-page-id')
const sugarml = require('sugarml')
const sugarss = require('sugarss')
const env = process.env.SPIKE_ENV
module.exports = {
devtool: 'source-map',
matchers: { html: '*(**/)*.sgr', css: '*(**/)*.sss' },
ignore: ['**/layout.sgr', '**/_*', '**/.*', 'readme.md', 'yarn.lock', 'package-lock.json'],
reshape: htmlStandards({
parser: sugarml,
locals: (ctx) => { return { pageId: pageId(ctx), foo: 'bar' } },
minify: env === 'production'
}),
postcss: cssStandards({
parser: sugarss,
minify: env === 'production',
warnForDuplicates: env !== 'production'
}),
babel: jsStandards()
}