Skip to content

Commit

Permalink
Build npm modules to root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Feb 27, 2015
1 parent 50dea8d commit 7a0b4a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"scripts": {
"build-global": "rm -rf build/global && NODE_ENV=production webpack modules/index.js build/global/mach.js && NODE_ENV=production COMPRESS=1 webpack modules/index.js build/global/mach.min.js && echo \"gzipped, the global build is `gzip -c build/global/mach.min.js | wc -c` bytes\"",
"build-npm": "rm -rf 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 && scripts/build-npm-package-json.sh > build/npm/package.json",
"build-npm": "rm -rf build/npm && babel -d build/npm ./modules && cp README.md build/npm && find -X build/npm -type d -name __tests__ | xargs rm -rf && scripts/build-npm-package-json.sh > build/npm/package.json",
"test": "jshint . && mocha --reporter spec 'modules/**/__tests__/*-test.js'",
"test-browser": "karma start"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/build-npm-package-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

var package = require('../package');

package.main = package.main.replace('modules', 'lib');
package.main = package.main.replace('modules/', '');
package.scripts = undefined;
package.devDependencies = undefined;

var browser = {};

for (var path in package.browser)
browser[path.replace('modules', 'lib')] = package.browser[path].replace('modules', 'lib');
browser[path.replace('modules/', '')] = package.browser[path].replace('modules/', '');

package.browser = browser;

Expand Down

0 comments on commit 7a0b4a8

Please sign in to comment.