Add Browserify for client-side code.

pull/1/head
Alex Kern 11 years ago
parent c7778c346d
commit 779b826d74

@ -1,2 +1,16 @@
# webdrop
Peer-to-peer file transfers in your browser
## Usage
$ npm install
$ npm start
The client-side assets are compiled using browserify. To build them:
$ npm run build
## License
MIT

@ -2,9 +2,10 @@
"name": "webdrop",
"version": "0.0.0",
"description": "Peer-to-peer file transfers in your browser",
"main": "lib/index.js",
"main": "server/index.js",
"scripts": {
"start": "node lib/index.js"
"start": "node server/index.js",
"build": "./node_modules/.bin/browserify client/index.js -o static/app.js"
},
"repository": {
"type": "git",
@ -17,6 +18,7 @@
},
"homepage": "https://github.com/kern/webdrop",
"dependencies": {
"browserify": "^9.0.3",
"express": "^4.12.0"
}
}

@ -4,3 +4,5 @@ var app = module.exports = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.use(express.static(__dirname + '/../static'));

@ -0,0 +1,4 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
alert("foo");
},{}]},{},[1]);
Loading…
Cancel
Save