feature(join) isJoinFile

This commit is contained in:
coderaiser 2014-08-15 04:13:40 -04:00
parent 24e558a569
commit da7c012fbe

View file

@ -13,6 +13,8 @@
path = require('path'),
zlib = require('zlib'),
FILE = __dirname + '/../join.js',
PREFIX = '/join';
module.exports = function(options) {
@ -42,20 +44,16 @@
else
isMinify = options.minify;
if (isJoinFile) {
ponse.sendFile({
name : __dirname + '/../join.js',
gzip : true,
request : req,
response: res
});
} else if (!isJoin) {
if (!isJoin) {
next();
} else {
prefix = options.prefix || PREFIX;
dir = options.dir || __dirname + '/../../';
names = parse(prefix, dir, path);
if (isJoinFile)
names = [FILE];
else
names = parse(prefix, dir, path);
exec.if(!isMinify, function(namesNew) {
var is = Util.isArray(namesNew);