Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'tests'

  • Loading branch information...
commit 9aadf005e8f062ace4a337e8e9bbd4498cfe56e6 2 parents 2ea7c37 + 9119c8d
@tj tj authored
View
12 .gitmodules
@@ -1,12 +0,0 @@
-[submodule "support/expresso"]
- path = support/expresso
- url = git://github.com/visionmedia/expresso.git
-[submodule "support/should"]
- path = support/should
- url = git://github.com/visionmedia/should.js.git
-[submodule "support/express"]
- path = support/express
- url = git://github.com/visionmedia/express.git
-[submodule "support/connect"]
- path = support/connect
- url = git://github.com/senchalabs/connect.git
View
5 Makefile
@@ -1,7 +1,6 @@
test:
- @./support/expresso/bin/expresso \
- -I lib \
- -I support
+ @./node_modules/expresso/bin/expresso \
+ -I lib
.PHONY: test
View
13 lib/express-expose.js
@@ -68,10 +68,15 @@ HTTPSServer.prototype.expose = function(obj, namespace, name){
var helpers = {};
app._exposed[name] = true;
helpers[name] = function(req, res){
- var js = '// app: \n';
- js += app.exposed(name);
- js += '// res: \n';
- js += res.exposed(name);
+ var appjs = app.exposed(name)
+ , resjs = res.exposed(name)
+ , js = '';
+
+ if (appjs || resjs) {
+ js += '// app: \n' + appjs;
+ js += '// res: \n' + resjs;
+ }
+
return js;
};
app.dynamicHelpers(helpers);
View
8 package.json
@@ -3,7 +3,13 @@
, "description": "Expose helpers and local variables to the client-side"
, "keywords": ["express"]
, "author": "TJ Holowaychuk <tj@vision-media.ca>"
- , "dependencies": {}
+ , "devDependencies": {
+ "connect": "1.4.x"
+ , "express": "2.3.x"
+ , "expresso": ">= 0.0.1"
+ , "should": ">= 0.0.1"
+ , "jade": ">= 0.0.1"
+ }
, "main": "index"
, "engines": { "node": "0.4.x" }
}
1  support/connect
@@ -1 +0,0 @@
-Subproject commit 4b5a36540b26ce13e1d7af3e0a1f2341730d03db
1  support/express
@@ -1 +0,0 @@
-Subproject commit 2942dafdfdbad5d94ee77ea417e7f403f419e42c
1  support/expresso
@@ -1 +0,0 @@
-Subproject commit e8f44768a9553cfcb75b219287bc498d077dd0b9
1  support/should
@@ -1 +0,0 @@
-Subproject commit aac07c66820f79685470f89716a57e62cde1d51b
Please sign in to comment.
Something went wrong with that request. Please try again.