Permalink
Browse files

[minor] Added a browserify hook for testing purposes.

  • Loading branch information...
1 parent 7b09580 commit 6d77d07edb37e33c84fe368ecfae50a8aab48939 @3rd-Eden 3rd-Eden committed Aug 8, 2013
Showing with 10 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +6 −0 example/index.js
  3. +2 −1 package.json
View
@@ -4,3 +4,5 @@ npm-debug.log
test/primus.save.async.js
test/primus.save.sync.js
.DS_Store
+example/primus.js
+example/primus.browserify.js
View
@@ -64,6 +64,12 @@ primus.on('connection', function connection(spark) {
});
//
+// Save the compiled file to the hard disk so it can also be distributed over
+// cdn's or just be served by something else than the build-in path.
+//
+primus.save('primus.js');
+
+//
// Everything is ready, listen to a port number to start the server.
//
server.listen(+argh.port || 8080);
View
@@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"integration": "NODE_ENV=testing ./node_modules/.bin/mocha $(find test -name '*.integration.js')",
- "test": "NODE_ENV=testing ./node_modules/.bin/mocha $(find test -name '*.test.js')"
+ "test": "NODE_ENV=testing ./node_modules/.bin/mocha $(find test -name '*.test.js')",
+ "browserify": "browserify example/primus.js -o example/primus.browserify.js --standalone Primus"
},
"repository": {
"type": "git",

0 comments on commit 6d77d07

Please sign in to comment.