Upgraded node support. Closes #169
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Merge branch 'upgrade'
authored by visionmedia · committed by visionmedia · parents 2a4cbb1, 70a99ad · Browse files · 6 files·+10 added−28 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+10 added−28 removed
- tests:+0 added−6 removed
- other:+10 added−22 removed
Provenance
- Commit
6ee83ba- Tree
6e9fbfa- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent 1
2a4cbb1- Parent 2
70a99ad
6 files changed+10 added−28 removed
modified:examples/chat/app.js+2 added-2 removed
5 unmodified lines678910101112131432 unmodified lines4748495051515253545515 unmodified lines5 unmodified linesconfigure(function(){ use(MethodOverride) use(ContentLength) use(CommonLogger) set('root', dirname(__filename)) set('root', __dirname) enable('cache static files') //enable('cache view contents')})
32 unmodified lines }, 100)})
get('/public/*', function(file){ this.sendfile(dirname(__filename) + '/public/' + file) this.sendfile(__dirname + '/public/' + file)})
get('/*.css', function(file){ this.render(file + '.sass.css', { layout: false })15 unmodified linesmodified:examples/upload/app.js+2 added-2 removed
5 unmodified lines678910101112131411 unmodified lines262728293030313233343 unmodified lines5 unmodified linesconfigure(function(){ use(MethodOverride) use(ContentLength) use(CommonLogger) set('root', dirname(__filename)) set('root', __dirname) enable('cache view contents')})
get('/', function(){11 unmodified lines this.redirect('/upload')})
get('/public/*', function(file){ this.sendfile(dirname(__filename) + '/public/' + file) this.sendfile(__dirname + '/public/' + file)})
get('/*.css', function(file){ this.render(file + '.sass.css', { layout: false })3 unmodified linesmodified:lib/express/helpers.js-12 removed
21 unmodified lines22 return uid23 }24 25 /**26- * Return the directory name of the given _path_.27- *28- * @param {string} path29- * @return {string}30- * @api public31- */32-33-exports.dirname = function(path) {34- return path.split('/').slice(0, -1).join('/')35-}36-37-/**26 * Return the extension name of the given _path_,27 * or null when not present.28 *29 * @param {string} path94 unmodified linesmodified:lib/express.js+4 added-4 removed
123456345678
var path = require('path')require.paths.unshift(path.dirname(__filename) + '/support/js-oo/lib')require.paths.unshift(path.dirname(__filename) + '/support/ejs/lib')require.paths.unshift(path.dirname(__filename) + '/support/haml/lib')require.paths.unshift(path.dirname(__filename) + '/support/sass/lib')require.paths.unshift(__dirname + '/support/js-oo/lib')require.paths.unshift(__dirname + '/support/ejs/lib')require.paths.unshift(__dirname + '/support/haml/lib')require.paths.unshift(__dirname + '/support/sass/lib')require('oo')require('express/core')modified:spec/spec.helpers.js-6 removed
39 unmodified lines404142434445464748494445464721 unmodified lines39 unmodified lines extname('/just/a/path').should.be_null end end describe 'dirname()' it 'should return the directory path' dirname('/path/to/images/foo.bar.png').should.eql '/path/to/images' end end describe 'basename()' it 'should return a files basename' basename('foo/bar/baz.image.png').should.eql 'baz.image.png' end21 unmodified linesmodified:Readme.md+2 added-2 removed
55 unmodified lines56 57 configure(function(){58 use(MethodOverride)59 use(ContentLength)60- set('root', dirname(__filename))60+ set('root', __dirname)61 })62 63 get('/hello', function(){64 this.contentType('html')37 unmodified lines102 $ node spec/node.js routing103 ...104 105 Express is currently being developed with node --version:106- v0.1.24-13-ge2abc5f106+ v0.1.27107 108 ## More Information109 110 * [JavaScript Extensions & Utilities](http://github.com/visionmedia/ext.js)34 unmodified lines