File tree Expand file tree Collapse file tree 5 files changed +108
-0
lines changed
Expand file tree Collapse file tree 5 files changed +108
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "presets" : [" es2015" , " react" ]
3+ }
Original file line number Diff line number Diff line change 1+ # EditorConfig helps developers define and maintain
2+ # consistent coding styles between different editors and IDEs.
3+
4+ root = true
5+
6+ [* ]
7+ end_of_line = lf
8+ charset = utf-8
9+ trim_trailing_whitespace = true
10+ insert_final_newline = true
11+ indent_style = space
12+ indent_size = 2
13+
14+ [* .md ]
15+ trim_trailing_whitespace = false
Original file line number Diff line number Diff line change 1+ .DS_Store
2+ * .log
3+ node_modules
4+ dist
5+ lib
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " react-async-loading" ,
3+ "version" : " 0.1.0" ,
4+ "description" : " Code splitting to React and Webpack" ,
5+ "main" : " ./lib/index.js" ,
6+ "keywords" : [
7+ " hoc" ,
8+ " code splitting" ,
9+ " react" ,
10+ " reactjs" ,
11+ " webpack"
12+ ],
13+ "author" : " Andrey Marchenko" ,
14+ "license" : " MIT" ,
15+ "scripts" : {
16+ "build" : " npm run build:lib && npm run build:dist" ,
17+ "build:lib" : " babel src --out-dir lib" ,
18+ "build:dist" : " webpack src/index.js dist/react-async-loading.min.js" ,
19+ "clean" : " rimraf lib dist" ,
20+ "prepublish" : " npm run clean && npm run build"
21+ },
22+ "repository" : {
23+ "type" : " git" ,
24+ "url" : " https://github.com/Tom910/react-async-loading.git"
25+ },
26+ "files" : [
27+ " lib" ,
28+ " src"
29+ ],
30+ "devDependencies" : {
31+ "babel-cli" : " 6.14.0" ,
32+ "babel-core" : " 6.14.0" ,
33+ "babel-loader" : " 6.2.5" ,
34+ "babel-preset-es2015" : " 6.14.0" ,
35+ "babel-preset-react" : " 6.11.1" ,
36+ "react" : " 15.3.1" ,
37+ "react-dom" : " 15.3.1" ,
38+ "rimraf" : " 2.5.4" ,
39+ "webpack" : " 2.1.0-beta.21"
40+ },
41+ "peerDependencies" : {
42+ "react" : " *"
43+ }
44+ }
Original file line number Diff line number Diff line change 1+ var webpack = require ( 'webpack' ) ;
2+
3+ var reactExternal = {
4+ root : 'React' ,
5+ commonjs2 : 'react' ,
6+ commonjs : 'react' ,
7+ amd : 'react'
8+ }
9+
10+ var env = process . env . NODE_ENV ;
11+ var config = {
12+ externals : {
13+ 'react' : reactExternal
14+ } ,
15+ module : {
16+ loaders : [
17+ { test : / \. j s $ / , loaders : [ 'babel' ] , exclude : / n o d e _ m o d u l e s / }
18+ ]
19+ } ,
20+ output : {
21+ library : 'ReactAsyncLoading' ,
22+ libraryTarget : 'umd'
23+ } ,
24+ plugins : [
25+ new webpack . optimize . OccurrenceOrderPlugin ( ) ,
26+ new webpack . DefinePlugin ( {
27+ 'process.env.NODE_ENV' : JSON . stringify ( env )
28+ } ) ,
29+ new webpack . optimize . UglifyJsPlugin ( {
30+ compressor : {
31+ pure_getters : true ,
32+ unsafe : true ,
33+ unsafe_comps : true ,
34+ screw_ie8 : true ,
35+ warnings : false
36+ }
37+ } )
38+ ]
39+ } ;
40+
41+ module . exports = config ;
You can’t perform that action at this time.
0 commit comments