Skip to content

Commit bf76677

Browse files
committed
Build npm package in build/npm
1 parent 851b791 commit bf76677

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

.npmignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
"name": "react-router",
33
"version": "0.12.0",
44
"description": "A complete routing library for React.js",
5-
"main": "modules/index.js",
5+
"main": "modules",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/rackt/react-router.git"
99
},
1010
"homepage": "https://github.com/rackt/react-router/blob/latest/README.md",
1111
"bugs": "https://github.com/rackt/react-router/issues",
12-
"directories": {
13-
"example": "examples"
14-
},
12+
"files": [
13+
"build/npm"
14+
],
1515
"scripts": {
1616
"build-global": "NODE_ENV=production webpack modules/index.js build/global/ReactRouter.js && NODE_ENV=production COMPRESS=1 webpack modules/index.js build/global/ReactRouter.min.js && echo \"gzipped, the global build is `gzip -c build/global/ReactRouter.min.js | wc -c` bytes\"",
17-
"build-npm": "babel -d npm/lib ./modules && cp README.md npm && node -p \"p=require('./package');p.main='lib/index.js';p.scripts=undefined;JSON.stringify(p,null,2)\" > npm/package.json",
17+
"build-npm": "babel -d build/npm/lib ./modules && cp README.md build/npm && find -X build/npm/lib -type d -name __tests__ | xargs rm -rf && node -p 'p=require(\"./package\");p.main=\"lib\";p.files=p.scripts=p.devDependencies=undefined;JSON.stringify(p,null,2)' > build/npm/package.json",
1818
"examples": "webpack-dev-server --config examples/webpack.config.js --no-info --content-base examples",
1919
"prepublish": "npm run build-npm",
2020
"test": "jsxhint . && karma start"

0 commit comments

Comments
 (0)