forked from DamesMakingGames/spf90fps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
44 lines (37 loc) · 1.17 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
require('dotenv').config()
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 SpikeDatoCMS = require('spike-datocms')
const postcssMixins = require('postcss-mixins')
const postcssColorFunc = require('postcss-color-mod-function')
const markdownItAttrs = require('markdown-it-attrs')
const locals = {}
const Dato = new SpikeDatoCMS({
addDataTo: locals,
token: process.env.dato_api_key,
models: [{
name: 'project'
}],
json: 'data.json'
})
module.exports = {
devtool: 'source-map',
matchers: { html: '*(**/)*.sgr', css: '*(**/)*.css' },
vendor: 'assets/js/vendor/**',
ignore: ['**/layout.sgr', '**/.*', 'readme.md', 'yarn.lock', 'package-lock.json'],
reshape: htmlStandards({
parser: sugarml,
locals: (ctx) => { return Object.assign(locals)},
markdownPlugins: [ markdownItAttrs]
}),
postcss: cssStandards({
appendPlugins: [postcssMixins(), postcssColorFunc()],
locals: { Dato }
}),
babel: jsStandards(),
plugins: [ Dato ]
}