Skip to content

Commit

Permalink
Npm umd packages (#89)
Browse files Browse the repository at this point in the history
* Add umd packages to npm repo via prepublish hook.

* Don't bundle angular and angular-ui-router within the umd package.
  • Loading branch information
kaidjohnson authored and hally9k committed May 2, 2017
1 parent c9af1cc commit 06b9431
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"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",
"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",
"build": "npm run clean; npm run test; node node_modules/.bin/babel src --out-dir lib",
"bundle:dev": "webpack --output-library=ngReduxUiRouter --output-library-target=umd lib/index.js dist/redux-ui-router.js",
"bundle:prod": "webpack -p --output-library=ngReduxUiRouter --output-library-target=umd lib/index.js dist/redux-ui-router.min.js",
"bundle:dev": "webpack lib/index.js dist/redux-ui-router.js",
"bundle:prod": "webpack -p lib/index.js dist/redux-ui-router.min.js",
"prepublish": "npm run build && npm run bundle:dev && npm run bundle:prod"
},
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
output: {
library: 'ngReduxUiRouter',
libraryTarget: 'umd'
},
externals: ['angular', 'angular-ui-router']
};

0 comments on commit 06b9431

Please sign in to comment.