flex-combo
Advanced tools
Comparing version 0.6.16 to 0.7.0
@@ -103,3 +103,3 @@ var urlLib = require("url"); | ||
if (dir && (/^\//.test(dir) || /^\w{1}:\\.*$/.test(dir))) { | ||
if (dir && (/^\//.test(dir) || /^\w{1}:[\\|\/].*$/.test(dir))) { | ||
this.confFile = pathLib.join(dir, "config.json"); | ||
@@ -106,0 +106,0 @@ } |
35
index.js
@@ -5,30 +5,13 @@ /** | ||
* */ | ||
var utilLib = require("mace"); | ||
var FlexCombo = require("./api"); | ||
var pathLib = require("path"); | ||
var FlexCombo = require("./api"); | ||
exports = module.exports = function (cwd, urls, param) { | ||
param = utilLib.merge(true, param, {urls: urls}); | ||
function enhanced(param, dir) { | ||
if (!dir) { | ||
var userHome = process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH; // 兼容Windows | ||
dir = pathLib.join(userHome, ".flex-combo"); | ||
} | ||
var userHome = process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH; // 兼容windows | ||
var dir = pathLib.join(userHome, ".flex-combo"); | ||
var fcInst; | ||
return function (req, res, next) { | ||
fcInst = new FlexCombo(param, dir); | ||
try { | ||
fcInst.handle(req, res, next); | ||
} | ||
catch (e) { | ||
next(); | ||
} | ||
}; | ||
}; | ||
exports.enhanced = function (param, dir) { | ||
var fcInst; | ||
return function () { | ||
@@ -67,2 +50,6 @@ fcInst = new FlexCombo(param, dir); | ||
} | ||
}; | ||
}; | ||
exports = module.exports = enhanced; | ||
// 以下为了兼容0.6.x版本 | ||
exports.enhanced = enhanced; |
{ | ||
"name": "flex-combo", | ||
"version": "0.6.16", | ||
"version": "0.7.0", | ||
"description": "The Flex-combo is combo tool designed for web front-end developer. It support various kinds of combo format by modify configuration(eg. yahoo combo).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41163
667