Permalink
Browse files

Redo build process for browsers and node. Update examples.

We now rely on browserify for building browser-specific versions of the JS
SDK. This can be initiated by running 'npm run build-js'. Node versions are
unaffected.
  • Loading branch information...
1 parent 8d29421 commit 9b4ba0afe82a6577e8df1be74fcbf43c2d0f84aa @Kegsay Kegsay committed Jun 3, 2015
View
@@ -1,9 +1,9 @@
#!/bin/bash
if [ "$1" == "-w" ]
then
- watchify index.js -o dist/browser-matrix-dev.js -v
+ watchify browser-index.js -o dist/browser-matrix-dev.js -v
else
npm_package_version=${npm_package_version:="dev"}
echo "Building version '$npm_package_version' to /dist"
- browserify index.js -o dist/browser-matrix-$npm_package_version.js
+ browserify browser-index.js -o dist/browser-matrix-$npm_package_version.js
fi
View
@@ -0,0 +1,4 @@
+var matrixcs = require("./lib/matrix");
+matrixcs.request(require("browser-request"));
+module.exports = matrixcs; // keep export for browserify package deps
+global.matrixcs = matrixcs;
View
@@ -1,3 +0,0 @@
-var matrixcs = require("../lib/matrix");
-matrixcs.request(require("browser-request"));
-module.exports = matrixcs;
Oops, something went wrong.

0 comments on commit 9b4ba0a

Please sign in to comment.