]> zoso.dev Git - buffer.git/commitdiff
add script to produce bundle on publish
authorFeross Aboukhadijeh <feross@feross.org>
Sun, 26 Jan 2014 04:20:09 +0000 (20:20 -0800)
committerFeross Aboukhadijeh <feross@feross.org>
Sun, 26 Jan 2014 04:20:09 +0000 (20:20 -0800)
bundle.sh [new file with mode: 0755]
package.json

diff --git a/bundle.sh b/bundle.sh
new file mode 100755 (executable)
index 0000000..ce3fcf2
--- /dev/null
+++ b/bundle.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+./node_modules/.bin/browserify --no-detect-globals -r ./ > bundle.js
+echo ';module.exports=require("./").Buffer;' >> bundle.js
index 62d0565a20bf74e0b3a3370fe94b778c692b69c6..145399d3f05126cfa290aba807d59e3109438751 100644 (file)
@@ -9,10 +9,12 @@
   },
   "devDependencies": {
     "benchmark": "*",
+    "browserify": "3.x",
     "tape": "*"
   },
   "scripts": {
     "test": "tape test/*.js",
+    "prepublish": "./bundle.js",
     "perf": "cd perf/solo && browserify --debug readUInt32BE.js > bundle.js && open index.html"
   },
   "testling": {