Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flex-combo

Package Overview
Dependencies
Maintainers
4
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-combo - npm Package Compare versions

Comparing version 0.7.7 to 0.7.8

28

api.js

@@ -126,2 +126,8 @@ var urlLib = require("url");

/* TPL动态编译 */
function tplCompiler(htmlfile, url) {
var jstpl = require("./engines/jstpl");
return jstpl.call(this, htmlfile, url);
}
/**

@@ -209,6 +215,11 @@ * FlexCombo类

{
rule: "\\.jpl$|\\.jpl\\.js$",
func: function (htmlfile, url) {
return tplCompiler(htmlfile, url);
}
},
{
rule: "\\.html\\.js$",
func: function (htmlfile, url) {
var jstpl = require("./engines/jstpl");
var content = jstpl.call(this, htmlfile, url);
var content = tplCompiler(htmlfile, url);
if (content) {

@@ -251,3 +262,3 @@ fsLib.writeFile(htmlfile, convert.call(this, content));

}
this.addEngine(k, require(pathLib.join(process.cwd(), engines[k])))
this.addEngine(k, require(pathLib.join(process.cwd(), engines[k])));
}

@@ -257,5 +268,12 @@ }

if (URL.match(new RegExp(suffix.join('|')))) {
var U4M = URL;
if (URL.match(/\.less$|\.scss$|\.sass$/)) {
U4M += ".css";
}
else if (URL.match(/\.jpl$/)) {
U4M += ".js";
}
res.writeHead(200, {
"Access-Control-Allow-Origin": '*',
"Content-Type": mime.lookup(URL) + (isBinFile(URL) ? '' : ";charset=" + this.param.charset),
"Content-Type": mime.lookup(U4M) + (isBinFile(URL) ? '' : ";charset=" + this.param.charset),
"X-MiddleWare": "flex-combo"

@@ -359,3 +377,3 @@ });

if (buff) {
var suffix = engine.rule.replace(/^\\./, '').split("\\.");
var suffix = engine.rule.replace(/^\\.|\$/g, '').split("\\.");
this.param.debug && Log.engine(_url, absPath.replace(new RegExp(engine.rule), '.' + (suffix[0] || "unknown")));

@@ -362,0 +380,0 @@ }

2

package.json
{
"name": "flex-combo",
"version": "0.7.7",
"version": "0.7.8",
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc