Compare commits

...

4 Commits
2.5.1 ... 2.5.2

Author SHA1 Message Date
Tj Holowaychuk
380a6c5363 Release 2.5.2 2011-12-10 11:07:21 -08:00
Tj Holowaychuk
c047b64ab5 removed less support since compiler() has gone away 2011-12-10 11:05:49 -08:00
Tj Holowaychuk
ae2bcb2615 express(1) LF -> CRLF for windows 2011-12-10 11:05:20 -08:00
Tj Holowaychuk
02cdf0c72b fixed express(1) --version 2011-11-18 08:03:16 -08:00
4 changed files with 28 additions and 44 deletions

View File

@@ -1,4 +1,9 @@
2.5.2 / 2011-12-10
==================
* Fixed: express(1) LF -> CRLF for windows
2.5.1 / 2011-11-17
==================

View File

@@ -12,7 +12,7 @@ var fs = require('fs')
* Framework version.
*/
var version = '2.5.0';
var version = '2.5.2';
/**
* Add session support.
@@ -43,7 +43,7 @@ var usage = ''
+ ' Options:\n'
+ ' -s, --sessions add session support\n'
+ ' -t, --template <engine> add template <engine> support (jade|ejs). default=jade\n'
+ ' -c, --css <engine> add stylesheet <engine> support (less|stylus). default=plain css\n'
+ ' -c, --css <engine> add stylesheet <engine> support (stylus). default=plain css\n'
+ ' -v, --version output framework version\n'
+ ' -h, --help output help information\n'
;
@@ -61,7 +61,7 @@ var index = [
, 'exports.index = function(req, res){'
, ' res.render(\'index\', { title: \'Express\' })'
, '};'
].join('\n');
].join('\r\n');
/**
* Jade layout template.
@@ -74,7 +74,7 @@ var jadeLayout = [
, ' title= title'
, ' link(rel=\'stylesheet\', href=\'/stylesheets/style.css\')'
, ' body!= body'
].join('\n');
].join('\r\n');
/**
* Jade index template.
@@ -83,7 +83,7 @@ var jadeLayout = [
var jadeIndex = [
'h1= title'
, 'p Welcome to #{title}'
].join('\n');
].join('\r\n');
/**
* EJS layout template.
@@ -100,7 +100,7 @@ var ejsLayout = [
, ' <%- body %>'
, ' </body>'
, '</html>'
].join('\n');
].join('\r\n');
/**
* EJS index template.
@@ -109,7 +109,7 @@ var ejsLayout = [
var ejsIndex = [
'<h1><%= title %></h1>'
, '<p>Welcome to <%= title %></p>'
].join('\n');
].join('\r\n');
/**
* Default css template.
@@ -124,22 +124,7 @@ var css = [
, 'a {'
, ' color: #00B7FF;'
, '}'
].join('\n');
/**
* Default less template.
*/
var less = [
'body {'
, ' padding: 50px;'
, ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;'
, '}'
, ''
, 'a {'
, ' color: #00B7FF;'
, '}'
].join('\n');
].join('\r\n');
/**
* Default stylus template.
@@ -151,7 +136,7 @@ var stylus = [
, ' font: 14px "Lucida Grande", Helvetica, Arial, sans-serif'
, 'a'
, ' color: #00B7FF'
].join('\n');
].join('\r\n');
/**
* App template.
@@ -194,7 +179,7 @@ var app = [
, 'app.listen(3000);'
, 'console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);'
, ''
].join('\n');
].join('\r\n');
// Parse arguments
@@ -277,9 +262,6 @@ function createApplicationAt(path) {
case 'stylus':
write(path + '/public/stylesheets/style.styl', stylus);
break;
case 'less':
write(path + '/public/stylesheets/style.less', less);
break;
default:
write(path + '/public/stylesheets/style.css', css);
}
@@ -304,11 +286,8 @@ function createApplicationAt(path) {
// CSS Engine support
switch (cssEngine) {
case 'less':
app = app.replace('{css}', '\n app.use(express.compiler({ src: __dirname + \'/public\', enable: [\'' + cssEngine + '\'] }));');
break;
case 'stylus':
app = app.replace('{css}', '\n app.use(require(\'stylus\').middleware({ src: __dirname + \'/public\' }));');
app = app.replace('{css}', '\r\n app.use(require(\'stylus\').middleware({ src: __dirname + \'/public\' }));');
break;
default:
app = app.replace('{css}', '');
@@ -316,22 +295,22 @@ function createApplicationAt(path) {
// Session support
app = app.replace('{sess}', sessions
? '\n app.use(express.cookieParser());\n app.use(express.session({ secret: \'your secret here\' }));'
? '\r\n app.use(express.cookieParser());\r\n app.use(express.session({ secret: \'your secret here\' }));'
: '');
// Template support
app = app.replace(':TEMPLATE', templateEngine);
// package.json
var json = '{\n';
json += ' "name": "application-name"\n';
json += ' , "version": "0.0.1"\n';
json += ' , "private": true\n';
json += ' , "dependencies": {\n';
json += ' "express": "' + version + '"\n';
if (cssEngine) json += ' , "' + cssEngine + '": ">= 0.0.1"\n';
if (templateEngine) json += ' , "' + templateEngine + '": ">= 0.0.1"\n';
json += ' }\n';
var json = '{\r\n';
json += ' "name": "application-name"\r\n';
json += ' , "version": "0.0.1"\r\n';
json += ' , "private": true\r\n';
json += ' , "dependencies": {\r\n';
json += ' "express": "' + version + '"\r\n';
if (cssEngine) json += ' , "' + cssEngine + '": ">= 0.0.1"\r\n';
if (templateEngine) json += ' , "' + templateEngine + '": ">= 0.0.1"\r\n';
json += ' }\r\n';
json += '}';

View File

@@ -28,7 +28,7 @@ var exports = module.exports = connect.middleware;
* Framework version.
*/
exports.version = '2.5.1';
exports.version = '2.5.2';
/**
* Shortcut for `new Server(...)`.

View File

@@ -1,7 +1,7 @@
{
"name": "express",
"description": "Sinatra inspired web development framework",
"version": "2.5.1",
"version": "2.5.2",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
{ "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" },