File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 99 "license" : " MIT" ,
1010 "author" :
" Jonny Buchanan <[email protected] > (https://github.com/insin)" ,
1111 "scripts" : {
12- "clean" : " rimraf lib dist" ,
1312 "build" : " babel src --out-dir lib" ,
14- "build:umd" : " webpack src/index.js dist/react-filtered-multiselect.js && webpack src/index.js dist/react-filtered-multiselect.min.js --config=webpack.prod.config.js" ,
15- "dist" : " npm run lint && npm run clean && npm run build && npm run build:umd" ,
16- "demo" : " eslint demo/src && rimraf demo/dist && webpack --config=webpack.demo.config.js" ,
13+ "build:demo" : " webpack --config=webpack.demo.config.js" ,
14+ "build:umd" : " webpack && webpack --config=webpack.prod.config.js" ,
15+ "clean" : " rimraf lib dist" ,
16+ "clean:demo" : " rimraf demo/dist" ,
17+ "dist" : " npm run lint && npm run clean && npm run build && npm run build:umd && npm run dist:demo" ,
18+ "dist:demo" : " npm run lint:demo && npm run clean:demo && npm run build:demo" ,
1719 "lint" : " eslint src" ,
20+ "lint:demo" : " eslint demo/src" ,
1821 "lint:fix" : " eslint src --fix" ,
1922 "test" : " eslint ."
2023 },
Original file line number Diff line number Diff line change 1+ var path = require ( 'path' )
2+
13var webpack = require ( 'webpack' )
24
35var pkg = require ( './package.json' )
@@ -25,14 +27,17 @@ if (process.env.NODE_ENV === 'production') {
2527}
2628
2729module . exports = {
30+ entry : path . resolve ( __dirname , 'src/index.js' ) ,
2831 module : {
2932 loaders : [
3033 { test : / \. j s $ / , loader : 'babel' , exclude : / n o d e _ m o d u l e s / }
3134 ]
3235 } ,
3336 output : {
37+ filename : pkg . name + ( process . env . NODE_ENV === 'production' ? '.min.js' : '.js' ) ,
3438 library : pkg . standalone ,
35- libraryTarget : 'umd'
39+ libraryTarget : 'umd' ,
40+ path : path . resolve ( __dirname , 'dist' )
3641 } ,
3742 externals : [ {
3843 'react' : {
You can’t perform that action at this time.
0 commit comments