-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
25 lines (22 loc) · 819 Bytes
/
app.js
File metadata and controls
25 lines (22 loc) · 819 Bytes
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
// dependencies
const htmlStandards = require('reshape-standard')
const cssStandards = require('spike-css-standards')
const jsStandards = require('spike-js-standards')
const renderComponents = require('reshape-preact-components')
// so we can use jsx
const preactBabel = require('babel-preset-preact')
const jsStd = jsStandards({ appendPresets: [preactBabel] })
require('babel-register')(jsStd)
// here's the actual component
const MyComponent = require('./assets/my-component')
// spike configuration
module.exports = {
entry: { main: './assets/index' },
ignore: ['**/layout.html', '**/_*', '**/.*', 'readme.md', 'yarn.lock'],
reshape: htmlStandards({
parser: false,
appendPlugins: [renderComponents({ 'my-component': MyComponent })]
}),
postcss: cssStandards({ parser: false }),
babel: jsStd
}