-
Notifications
You must be signed in to change notification settings - Fork 0
/
stacks.js
59 lines (57 loc) · 1.64 KB
/
stacks.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
54
55
56
57
58
59
module.exports = [
{
name: 'react',
nature: 'js',
files: [
'site/react.js',
'site/react-dom.js',
'prop-types',
'core-js/modules/es6.object.assign.js'
],
browserify: {
// Cannot use `*` here, because `*` automatically expose npm module name.
// In this stack, we have to do some tricks to build react
exposes: 'react.js:react, react-dom.js:react-dom, prop-types'
}
},
{
name: 'bundle',
nature: 'js',
files: [
'inherits',
// following React Add-Ons do not have internal dependency to React,
// so no more multiple React copies loaded error.
// Remove the followings, if they are extraneous
'react-addons-css-transition-group',
'react-addons-update',
'react-addons-transition-group',
'react-addons-shallow-compare',
'react-addons-pure-render-mixin',
'react-addons-linked-state-mixin',
'react-addons-clone-with-props',
'react-addons-create-fragment',
// add needed material-ui components here
'material-ui/styles/MuiThemeProvider',
'material-ui/styles/getMuiTheme',
'material-ui/RaisedButton'
],
browserify: {
exposes: '*', externals: ['react', 'react-dom', 'prop-types']
}
},
{
name: 'file-button',
nature: 'js',
files: 'rendering.js',
watch: 'rendering.js, lib/**/*.*',
browserify: {
// add React Add-Ons, if this component needs them
externals: ['react', 'react-dom', 'inherits',
'prop-types',
'material-ui/styles/MuiThemeProvider',
'material-ui/styles/getMuiTheme',
'material-ui/RaisedButton'
]
}
}
]