File tree 3 files changed +80
-1
lines changed
3 files changed +80
-1
lines changed Original file line number Diff line number Diff line change 59
59
"loose-envify" : " ^1.1.0" ,
60
60
"object-assign" : " ^4.1.0" ,
61
61
"platform" : " ^1.1.0" ,
62
+ "rollup" : " ^0.33.0" ,
63
+ "rollup-plugin-babel" : " ^2.6.1" ,
64
+ "rollup-plugin-node-resolve" : " ^1.7.1" ,
65
+ "rollup-plugin-replace" : " ^1.1.1" ,
66
+ "rollup-plugin-uglify" : " ^1.0.1" ,
62
67
"run-sequence" : " ^1.1.4" ,
63
68
"through2" : " ^2.0.0" ,
64
69
"tmp" : " ~0.0.28" ,
79
84
"lint" : " grunt lint" ,
80
85
"postinstall" : " node node_modules/fbjs-scripts/node/check-dev-engines.js package.json" ,
81
86
"test" : " jest" ,
82
- "flow" : " flow"
87
+ "flow" : " flow" ,
88
+ "rollup:dev" : " rollup -c scripts/rollup/rollup.config.dev.js" ,
89
+ "rollup:prod" : " rollup -c scripts/rollup/rollup.config.prod.js"
83
90
},
84
91
"jest" : {
85
92
"modulePathIgnorePatterns" : [
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2013-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+ 'use strict' ;
10
+
11
+ var babel = require ( 'rollup-plugin-babel' ) ;
12
+ var replace = require ( 'rollup-plugin-replace' ) ;
13
+ var resolve = require ( 'rollup-plugin-node-resolve' ) ;
14
+
15
+ var babelEs6ModulifyPlugin = require ( '../babel/transform-es6-modulify' ) ;
16
+
17
+ module . exports = {
18
+ dest : 'build/react.rollup.dev.js' ,
19
+ entry : 'build/modules/ReactUMDEntry.js' ,
20
+ moduleName : 'React' ,
21
+ format : 'umd' ,
22
+ plugins : [
23
+ babel ( {
24
+ babelrc : false ,
25
+ plugins : [ babelEs6ModulifyPlugin ] ,
26
+ } ) ,
27
+ replace ( {
28
+ 'process.env.NODE_ENV' : JSON . stringify ( 'development' ) ,
29
+ } ) ,
30
+ resolve ( {
31
+ main : true ,
32
+ } ) ,
33
+ ] ,
34
+ sourceMap : false ,
35
+ } ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright (c) 2013-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ */
9
+ 'use strict' ;
10
+
11
+ var babel = require ( 'rollup-plugin-babel' ) ;
12
+ var replace = require ( 'rollup-plugin-replace' ) ;
13
+ var resolve = require ( 'rollup-plugin-node-resolve' ) ;
14
+ var uglify = require ( 'rollup-plugin-uglify' ) ;
15
+
16
+ var babelEs6ModulifyPlugin = require ( '../babel/transform-es6-modulify' ) ;
17
+
18
+ module . exports = {
19
+ dest : 'build/react.rollup.prod.js' ,
20
+ entry : 'build/modules/ReactUMDEntry.js' ,
21
+ moduleName : 'React' ,
22
+ format : 'umd' ,
23
+ plugins : [
24
+ babel ( {
25
+ babelrc : false ,
26
+ plugins : [ babelEs6ModulifyPlugin ] ,
27
+ } ) ,
28
+ replace ( {
29
+ 'process.env.NODE_ENV' : JSON . stringify ( 'production' ) ,
30
+ } ) ,
31
+ resolve ( {
32
+ main : true ,
33
+ } ) ,
34
+ uglify ( ) ,
35
+ ] ,
36
+ sourceMap : false ,
37
+ } ;
You can’t perform that action at this time.
0 commit comments