Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implemented better browserify pipeline

  • Loading branch information...
commit 2ae3b9dde23dbeec32225d958ba611c849494515 1 parent dc2afa4
@rauchg rauchg authored
Showing with 37 additions and 2 deletions.
  1. +4 −2 Makefile
  2. +27 −0 support/browserify.js
  3. +6 −0 support/browserify.sh
View
6 Makefile
@@ -1,8 +1,10 @@
REPORTER = dot
-build:
- @./node_modules/.bin/browserify --standalone io -o socket.io.js .
+build: socket.io.js
+
+socket.io.js: lib/*.js package.json
+ @./support/browserify.sh > socket.io.js
test:
@./node_modules/.bin/mocha \
View
27 support/browserify.js
@@ -0,0 +1,27 @@
+
+/**
+ * Module dependencies.
+ */
+
+var browserify = require('browserify');
+var path = require.resolve('../');
+
+/**
+ * Module exports.
+ */
+
+module.exports = build;
+
+/**
+ * Make the build.
+ *
+ * @api public
+ */
+
+
+function build(fn){
+ var opts = {};
+ opts.builtins = false;
+ opts.insertGlobals = 'global';
+ browserify(path, opts).bundle({ standalone: 'io' }, fn);
+}
View
6 support/browserify.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+
+require('./browserify')(function(err, out){
+ if (err) throw err;
+ console.log(out);
+});
Please sign in to comment.
Something went wrong with that request. Please try again.