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

grunt-combohtml

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-combohtml - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

7

package.json
{
"name": "grunt-combohtml",
"description": "combine build html with ssi.",
"version": "0.1.4",
"version": "0.1.5",
"homepage": "",

@@ -40,8 +40,7 @@ "author": {

"readmeFilename": "README.md",
"_id": "grunt-combohtml@0.1.3",
"_id": "grunt-combohtml@0.1.4",
"_from": "grunt-combohtml@",
"dist": {
"shasum": "876e2218d24b85ff2c43365a7f42569528a40fed"
},
"_resolved": "https://registry.npmjs.org/grunt-flexcombo/-/grunt-flexcombo-0.1.8.tgz"
}
}

@@ -31,3 +31,7 @@ # grunt-combohtml

options:{
encoding:'utf8'
encoding:'utf8',//输出文件编码
replacement:{ // 抓取js/css文件时路径替换规则,留空为不替换
from:/src\//,
to:'build/'
}
},

@@ -39,5 +43,5 @@ main:{

cwd:'src',
src: ['**/*.html'],
src: ['**/*.htm'],
dest: 'build/',
ext: '.html'
ext: '.htm'
}

@@ -44,0 +48,0 @@ ]

@@ -51,4 +51,4 @@ /*

var js_content = concat(result.js,dest_js,v.orig.cwd,p);
var css_content = concat(result.css,dest_css,v.orig.cwd,p);
var js_content = concat(result.js,dest_js,v.orig.cwd,p,options.replacement);
var css_content = concat(result.css,dest_css,v.orig.cwd,p,options.replacement);

@@ -55,0 +55,0 @@ chunk = chunk.replace('@@script',path.basename(v.dest,path.extname(v.dest)) + '.js');

@@ -13,6 +13,8 @@ // 'use strict';

// 'src/~page/index.html'
function concat(a,o,dest,p){
// {from:/src/,to:'build'}
function concat(a,o,dest,p,replacement){
var content = '';
var a = a.reverse();
// console.log(a);
// var a = a.reverse();
var rel = path.dirname(path.relative(dest,p));

@@ -26,2 +28,5 @@ fs.writeFileSync(o,'',{

var ap = path.resolve(pwd,dest,rel,v);
if(replacement){
ap = ap.replace(replacement.from,replacement.to);
}
if(!fs.existsSync(ap)){

@@ -28,0 +33,0 @@ return;

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