Permalink
Browse files

Remove modules hash from package.json since npm no longer supports it

Change-Id: I00b8a236af8c6475aafeb53cf9af959487d85454
  • Loading branch information...
1 parent 6d168ff commit 9893d54d59c7264b7f65e4fa8ebf72f0936a1bf1 Tim Caswell committed Feb 18, 2011
Showing with 22 additions and 10 deletions.
  1. +9 −0 index.js
  2. +2 −10 package.json
  3. +11 −0 vhost.js
View
@@ -0,0 +1,9 @@
+require('fs').readdirSync(__dirname).forEach(function (name) {
+ if (name !== 'index.js' && name.substr(name.length-3) === ".js") {
+ var name = name.substr(0, name.length - 3);
+ Object.defineProperty(exports, name, {get: function () {
+ return require("./" + name);
+ }, enumerable: true});
+ }
+});
+
View
@@ -2,21 +2,13 @@
"name": "creationix",
"description": "Creationix is a meta package for my personal packages",
"tags": ["stack", "creationix", "meta", "sandbox"],
- "version": "0.0.10",
+ "version": "0.1.0",
"author": "Tim Caswell <tim@creationix.com>",
"repository": {
"type": "git",
"url": "http://github.com/creationix/creationix.git"
},
- "modules": {
- "static": "static.js",
- "auth": "auth.js",
- "listing": "listing.js",
- "mount": "mount.js",
- "vhost": "vhost.js",
- "log": "log.js",
- "controllers": "controllers.js"
- },
+ "index": "index.js",
"dependencies": {
"stack": ">=0.0.3",
"simple-mime": ">=0.0.1"
View
@@ -0,0 +1,11 @@
+
+
+module.exports = function setup(domain, handler) {
+ return function handle(req, res, next) {
+ if (req.headers.host === domain) {
+ handler(req, res, next);
+ } else {
+ next();
+ }
+ };
+};

0 comments on commit 9893d54

Please sign in to comment.