mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
feature(join) isJoinFile
This commit is contained in:
parent
24e558a569
commit
da7c012fbe
1 changed files with 7 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue