Merge branch 'refactor/dev-deps'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tj Holowaychuk · committed by Tj Holowaychuk · parents c6122da, 7128f2d · Browse files · 43 files·+55 added−124 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
43 files+55 added−124 removed
- tests:+1 added−0 removed
- other:+54 added−124 removed
Provenance
- Commit
7999386- Tree
bc50845- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent 1
c6122da- Parent 2
7128f2d
43 files changed+55 added−124 removed
modified:docs/contrib.md+2 added-3 removed
1234545767891027 unmodified lines
### Development Dependencies
Express development dependencies are stored within the _./support_ directory. Toupdate them execute:First install the dev dependencies by executing the following command in the repo's directory:
$ git submodule update --init $ npm install
### Running Tests
Express uses the [Expresso](http://github.com/visionmedia/expresso) TDD27 unmodified linesmodified:examples/auth/app.js-3 removed
12342345118 unmodified linesExpand all
// Expose modules in ./support for demo purposesrequire.paths.unshift(__dirname + '/../../support');
/** * Module dependencies. */
118 unmodified linesExpand allmodified:examples/blog/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 53 unmodified linesmodified:examples/cookies/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 41 unmodified linesmodified:examples/downloads/app.js+11 added-7 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 14 unmodified lines20 var file = req.params.file21 , path = __dirname + '/files/' + file;22 // either res.download(path) and let23 // express handle failures, or provide27- // a callback24+ // a callback as shown below25 res.download(path, function(err){26+ // if an error occurs in this callback27+ // the file most likely does not exist,28+ // and it's safe to respond or next(err)29 if (err) return next(err);30- // the response has invoked .end()31- // so you cannnot respond here (of course)32- // but the callback is handy for statistics etc.30+31+ // the file has been transferred, do not respond32+ // from here, though you may use this callback33+ // for stats etc.34 console.log('transferred %s', path);35+ }, function(err){36+ // this second optional callback is used when37+ // an error occurs during transmission38 });39 });40 41 app.error(function(err, req, res, next){10 unmodified linesmodified:examples/ejs/app.js-3 removed
1234234526 unmodified lines
// Expose modules in ./support for demo purposesrequire.paths.unshift(__dirname + '/../../support');
/** * Module dependencies. */
26 unmodified linesmodified:examples/error/app.js+2 added-4 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 15 unmodified lines21 // as well as show the stack trace in responses, currently handles text/plain,22 // text/html, and application/json responses to aid in development23 app.use('/', express.errorHandler({ dump: true, stack: true }));24 28-app.listen(3000);25+app.listen(3000);26+console.log('app listening on port 3000');modified:examples/flash/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 41 unmodified linesmodified:examples/format/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 63 unmodified linesmodified:examples/github/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 108 unmodified linesmodified:examples/jade/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 69 unmodified linesmodified:examples/layout-control/app.js-2 removed
1-// Expose modules in ./support for demo purposes2-require.paths.unshift(__dirname + '/../../support');1 2 /**3 * Module dependencies.4 */28 unmodified linesmodified:examples/markdown/app.js-5 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-5-// $ npm install node-markdown6-2 /**3 * Module dependencies.4 */5 31 unmodified linesmodified:examples/mounting/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 19 unmodified linesmodified:examples/multipart/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 43 unmodified linesmodified:examples/mvc/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 8 unmodified linesmodified:examples/params/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 56 unmodified linesmodified:examples/partials/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 27 unmodified linesmodified:examples/resource/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 84 unmodified linesmodified:examples/route-middleware/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 81 unmodified linesmodified:examples/route-separation/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 33 unmodified linesmodified:examples/say/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 39 unmodified linesmodified:examples/session/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 28 unmodified linesmodified:examples/session/redis.js+1 added-4 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 5 unmodified lines11 var app = express.createServer(12 express.logger(),13 14 // Required by session() middleware18- express.cookieDecoder(),15+ express.cookieParser(),16 17 // Populates:18 // - req.session19 // - req.sessionStore17 unmodified linesmodified:examples/stylus/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 46 unmodified linesmodified:examples/vhost/app.js-3 removed
1 2-// Expose modules in ./support for demo purposes3-require.paths.unshift(__dirname + '/../../support');4-2 /**3 * Module dependencies.4 */5 45 unmodified linesmodified:lib/view.js+3 added-2 removed
338 unmodified lines339 , app = this.app340 , helpers = app._locals341 , dynamicHelpers = app.dynamicViewHelpers342 , viewOptions = app.set('view options')343- , cacheViews = app.enabled('view cache')343 , root = app.set('views') || process.cwd() + '/views';344 345 // cache id347- var cid = view + (parent ? ':' + parent.path : '');346+ var cid = app.enabled('view cache')347+ ? view + (parent ? ':' + parent.path : '')348+ : false;349 350 // merge "view options"351 if (viewOptions) merge(options, viewOptions);352 110 unmodified linesdeleted:support/connectnot shown
Its text is not shown, deleted.
deleted:support/connect-formnot shown
Its text is not shown, deleted.
deleted:support/ejsnot shown
Its text is not shown, deleted.
deleted:support/expressonot shown
Its text is not shown, deleted.
deleted:support/formidablenot shown
Its text is not shown, deleted.
deleted:support/hamlnot shown
Its text is not shown, deleted.
deleted:support/jadenot shown
Its text is not shown, deleted.
deleted:support/mimenot shown
Its text is not shown, deleted.
deleted:support/qsnot shown
Its text is not shown, deleted.
deleted:support/shouldnot shown
Its text is not shown, deleted.
modified:test/view.test.js+1 added
103 unmodified lines104 105 'test #render()': function(){106 var app = create();107 app.set('view engine', 'jade');108+ app.register('haml', require('hamljs'));109 110 app.get('/', function(req, res){111 res.render('index.jade', { layout: false });112 });979 unmodified linesmodified:.gitignore+1 added
8 unmodified lines9 *.swp10 *.swo11 benchmarks/graphs12 testing.js13+node_modules/modified:.gitmodules-30 removed
1-[submodule "support/expresso"]2- path = support/expresso3- url = git://github.com/visionmedia/expresso.git4-[submodule "support/haml"]5- path = support/haml6- url = git://github.com/visionmedia/haml.js.git7-[submodule "support/ejs"]8- path = support/ejs9- url = git://github.com/visionmedia/ejs.git10-[submodule "support/connect-form"]11- path = support/connect-form12- url = git://github.com/visionmedia/connect-form.git13-[submodule "support/connect"]14- path = support/connect15- url = git://github.com/senchalabs/connect.git16-[submodule "support/should"]17- path = support/should18- url = git://github.com/visionmedia/should.js.git19-[submodule "support/formidable"]20- path = support/formidable21- url = git://github.com/felixge/node-formidable.git22-[submodule "support/jade"]23- path = support/jade24- url = git://github.com/visionmedia/jade.git25-[submodule "support/qs"]26- path = support/qs27- url = git://github.com/visionmedia/node-querystring.git28-[submodule "support/mime"]29- path = support/mime30- url = https://github.com/bentomas/node-mime.gitmodified:Makefile+1 added-6 removed
1 unmodified line2 DOCS = $(shell find docs/*.md)3 HTMLDOCS =$(DOCS:.md=.html)4 5 test:6- @NODE_ENV=test ./support/expresso/bin/expresso \6+ @NODE_ENV=test ./node_modules/.bin/expresso \7 -I lib \8- -I support \9- -I support/connect/lib \10- -I support/haml/lib \11- -I support/jade/lib \12- -I support/ejs/lib \8 $(TESTFLAGS) \9 test/*.test.js10 11 test-cov:23 unmodified linesmodified:package.json+13 added-1 removed
8 unmodified lines9 { "name": "Ciaran Jessup", "email": "ciaranj@gmail.com" },10 { "name": "Guillermo Rauch", "email": "rauchg@gmail.com" }11 ],12 "dependencies": {13- "connect": ">= 1.4.0 < 2.0.0",13+ "connect": ">= 1.4.1 < 2.0.0",14 "mime": ">= 0.0.1",15 "qs": ">= 0.0.6"16 },17+ "devDependencies": {18+ "connect-form": "0.2.1",19+ "ejs": "0.4.2",20+ "expresso": "0.7.2",21+ "hamljs": "0.5.1",22+ "jade": "0.11.0",23+ "stylus": "0.13.0",24+ "should": "0.2.1",25+ "express-messages": "0.0.2",26+ "node-markdown": ">= 0.0.1",27+ "connect-redis": ">= 0.0.1"28+ },29 "keywords": ["framework", "sinatra", "web", "rest", "restful"],30 "repository": "git://github.com/visionmedia/express",31 "main": "index",32 "bin": { "express": "./bin/express" },2 unmodified linesmodified:Readme.md+20 added
74 unmodified lines75 Express 1.x is compatible with node 0.2.x and connect < 1.0.76 77 Express 2.x is compatible with node 0.4.x and connect 1.x78 79+## Viewing Examples80+81+First install the dev dependencies to install all the example / test suite deps:82+83+ $ npm install84+85+then run whichever tests you want:86+87+ $ node examples/jade/app.js88+89+## Running Tests90+91+To run the test suite first invoke the following command within the repo, installing the development dependencies:92+93+ $ npm install94+95+then run the tests:96+97+ $ make test98+99 ## License 100 101 (The MIT License)102 20 unmodified lines