forked from ucfopen/labeling-materia-widget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
53 lines (47 loc) · 1.4 KB
/
webpack.config.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
45
46
47
48
49
50
51
52
53
const fs = require('fs')
const path = require('path')
const widgetWebpack = require('materia-widget-development-kit/webpack-widget')
const copy = widgetWebpack.getDefaultCopyList()
const outputPath = path.join(process.cwd(), 'build')
const customCopy = copy.concat([
{
from: path.join(__dirname, 'src', '_guides', 'assets'),
to: path.join(outputPath, 'guides', 'assets'),
toType: 'dir'
},
])
const entries = {
'creator.js': [
path.join(__dirname, 'src', 'spectrum.custom.js'),
path.join(__dirname, 'src', 'draw.coffee'),
path.join(__dirname, 'src', 'creator.coffee')
],
'player.js': [
path.join(__dirname, 'src', 'draw.coffee'),
path.join(__dirname, 'src', 'player.coffee')
],
'creator.css': [
path.join(__dirname, 'src', 'creator.html'),
path.join(__dirname, 'src', 'creator.scss')
],
'player.css': [
path.join(__dirname, 'src', 'player.html'),
path.join(__dirname, 'src', 'player.scss')
],
'guides/guideStyles.css': [
path.join(__dirname, 'src', '_guides', 'guideStyles.scss'),
],
'guides/player.temp.html': [
path.join(__dirname, 'src', '_guides', 'player.md')
],
'guides/creator.temp.html': [
path.join(__dirname, 'src', '_guides', 'creator.md')
]
}
const options = {
copyList: customCopy,
entries: entries
}
let buildConfig = widgetWebpack.getLegacyWidgetBuildConfig(options)
module.exports = buildConfig
// module.exports = widgetWebpack.getLegacyWidgetBuildConfig(options)