Skip to content

Commit 06b9431

Browse files
kaidjohnsonhally9k
authored andcommitted
Npm umd packages (#89)
* Add umd packages to npm repo via prepublish hook. * Don't bundle angular and angular-ui-router within the umd package.
1 parent c9af1cc commit 06b9431

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"test": "npm run lint; NODE_ENV=test node node_modules/.bin/mocha --compilers js:babel-register --recursive --require src/__tests__/index.js src/**/*.test.js",
1010
"test:live": "npm run lint; NODE_ENV=test node node_modules/.bin/mocha --compilers js:babel-register --recursive --require src/__tests__/index.js -w src/**/*.test.js",
1111
"build": "npm run clean; npm run test; node node_modules/.bin/babel src --out-dir lib",
12-
"bundle:dev": "webpack --output-library=ngReduxUiRouter --output-library-target=umd lib/index.js dist/redux-ui-router.js",
13-
"bundle:prod": "webpack -p --output-library=ngReduxUiRouter --output-library-target=umd lib/index.js dist/redux-ui-router.min.js",
12+
"bundle:dev": "webpack lib/index.js dist/redux-ui-router.js",
13+
"bundle:prod": "webpack -p lib/index.js dist/redux-ui-router.min.js",
1414
"prepublish": "npm run build && npm run bundle:dev && npm run bundle:prod"
1515
},
1616
"repository": {

webpack.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
output: {
3+
library: 'ngReduxUiRouter',
4+
libraryTarget: 'umd'
5+
},
6+
externals: ['angular', 'angular-ui-router']
7+
};

0 commit comments

Comments
 (0)