Permalink
Browse files

Merge pull request #8 from iwillwen/fix

移除node_modules, 运行前执行npm install安装即可,无需代码托管。添加npm test命令。添加travis-ci配置
  • Loading branch information...
iwillwen committed Mar 14, 2013
2 parents 3117710 + d3c6e4a commit cb1b824aa9bb6a71e5bf597704395773669e108c
Showing 740 changed files with 17 additions and 54,498 deletions.
View
@@ -0,0 +1,3 @@
+node_modules
+**.txt
+npm_debug.log
View
@@ -1,3 +1,3 @@
-node_modelus
+node_modules
**.txt
-npm_debug.log
+npm_debug.log
@@ -2,4 +2,4 @@ language: node_js
node_js:
- 0.6
- 0.8
- - 0.9
+ - 0.10
View
@@ -7,7 +7,7 @@ var connect = require('connect');
var https = require('https');
var http = require('http');
var dataStream = require('dataStream');
-var eventproxy = require('eventproxy').EventProxy;
+var EventProxy = require('eventproxy');
var url = require('url');
var utils = require('./utils');
var middlewares = ['basicAuth', 'bodyParser', 'cookieParser', 'cookieSession', 'csrf', 'directory', 'errorHandler', 'favicon', 'json', 'limit', 'logger', 'methodOverride', 'multipart', 'query', 'responseTime', 'session', 'staticCache', 'urlencoded', 'vhost'];
@@ -666,9 +666,9 @@ function method (web) {
var ext = self.set('view engine') || 'jade';
var engine = require(ext);
var root = self.set('views');
- var render = new eventproxy();
+ var render = new EventProxy();
if (!/\/$/i.test(root)) root += '/';
- render.assign('layout', 'body', function (layout, body) {
+ render.all('layout', 'body', function (layout, body) {
layout_view.body = body;
engine.render(layout, layout_view, function (err, fin) {
if (err) return callback(err);
@@ -693,9 +693,9 @@ function method (web) {
view.partial = function (tmlp) {
return fs.readFileSync(root + tmlp + '.' + ext);
};
- fs.readFile(root + name + '.' + ext, function (err, tmlp) {
+ fs.readFile(root + name + '.' + ext, 'utf-8', function (err, tmlp) {
if (err) return self.sendError(500);
- engine.render(tmlp.toString(), view, function (err, body) {
+ engine.render(tmlp, view, function (err, body) {
if (err) return self.sendError(500);
render.trigger('body', body);
});
@@ -714,4 +714,4 @@ function method (web) {
web[middlewares[i]] = connect[middlewares[i]];
}
}
-module.exports.ext = method;
+module.exports.ext = method;
View
@@ -1,4 +1,4 @@
-var mimes = require('./mimes').mimes;
+var mimes = require('mime').mimes;
var url = require('url');
var http = require('http');
var util = require('util');
@@ -73,4 +73,4 @@ Request.prototype.__defineGetter__('reqPath', function () {
}
});
-var navites = ["socket","connection","httpVersion","complete","headers","trailers","readable","_paused","_pendings","_endEmitted","url","method","statusCode","httpVersionMajor","httpVersionMinor","upgrade","originalUrl","_parsedUrl","fn","destroy","setEncoding","pause","resume","_emitPending","_emitData","_emitEnd","_addHeaderLine","pipe","setMaxListeners","emit","addListener","on","once","removeListener","removeAllListeners","listeners"];
+var navites = ["socket","connection","httpVersion","complete","headers","trailers","readable","_paused","_pendings","_endEmitted","url","method","statusCode","httpVersionMajor","httpVersionMinor","upgrade","originalUrl","_parsedUrl","fn","destroy","setEncoding","pause","resume","_emitPending","_emitData","_emitEnd","_addHeaderLine","pipe","setMaxListeners","emit","addListener","on","once","removeListener","removeAllListeners","listeners"];
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit cb1b824

Please sign in to comment.