fis-postprocessor-jswrapper
Advanced tools
Comparing version 0.0.12 to 0.0.13
13
index.js
@@ -15,2 +15,9 @@ /* | ||
//扩展template能力,支持function | ||
if(typeof template==='function'){ | ||
var temp = template(file); | ||
if(temp){ | ||
template = temp; | ||
} | ||
} | ||
// wrap | ||
@@ -20,3 +27,5 @@ if (template) { | ||
.split('${content}').join(content) | ||
.split('${id}').join(file.getId()); | ||
.split('${id}').join(file.getId()) | ||
.split('${hash}').join(file.getHash()); | ||
//增加md5 | ||
} else if (type === 'amd') { | ||
@@ -38,2 +47,2 @@ if (!/^\s*define\s*\(/.test(content)) { | ||
return local && typeof local[key] !== 'undefined' ? local[key] : global[key]; | ||
} | ||
} |
{ | ||
"name": "fis-postprocessor-jswrapper", | ||
"description": "A postprocessor plugin for fis to wrap javascript with closure or amd define.", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"author": "FIS Team <fis@baidu.com>", | ||
@@ -19,2 +19,2 @@ "homepage": "http://fis.baidu.com/", | ||
} | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4158
40
1