New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-html-inheritance

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-html-inheritance - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

2

Gruntfile.js

@@ -24,3 +24,3 @@ /*

options: {
modules: ["ver1"], //array of modules you want to build additionall to "main"
modules: ["main", "ver1"], //array of modules you want to build additionall to "main"
dstDir: "tmp",

@@ -27,0 +27,0 @@ },

{
"name": "grunt-html-inheritance",
"description": "The engine to build htmls with replacing, inserting or modifing separated tags only using small html patches.",
"version": "0.1.8",
"version": "0.1.9",
"homepage": "https://github.com/huston007/grunt-html-inheritance",

@@ -6,0 +6,0 @@ "author": {

@@ -163,78 +163,75 @@ /*

var kindOf = grunt.util.kindOf;
var options = this.options({
encoding: grunt.file.defaultEncoding,
// processContent/processContentExclude deprecated renamed to process/noProcess
processContent: false,
processContentExclude: [],
mode: false
});
var copyOptions = {
encoding: options.encoding,
process: processFile,
noProcess: options.noProcess || options.processContentExclude,
};
//Adding provided modules
if (options.modules){
modules = options.modules;
}
//saving destination directory
dstDir = options.dstDir;
var options = this.options({
encoding: grunt.file.defaultEncoding,
// processContent/processContentExclude deprecated renamed to process/noProcess
processContent: false,
processContentExclude: [],
mode: false
});
var dest;
var tally = {
dirs: 0,
files: 0
};
var copyOptions = {
encoding: options.encoding,
process: processFile,
noProcess: options.noProcess || options.processContentExclude,
};
//Adding provided modules
if (options.modules){
modules = ["main"].concat(options.modules);
var copyFunction =function(src, dst, isExpandedPair){
if (detectDestType(dst) === 'directory') {
dstpath = dest = (isExpandedPair) ? dst : unixifyPath(path.join(dst, src));
} else {
dstpath = dest = dst;
}
//saving destination directory
dstDir = options.dstDir;
var dest;
var tally = {
dirs: 0,
files: 0
};
var copyFunction =function(src, dst, isExpandedPair){
if (detectDestType(dst) === 'directory') {
dstpath = dest = (isExpandedPair) ? dst : unixifyPath(path.join(dst, src));
} else {
dstpath = dest = dst;
}
if (grunt.file.isDir(src)) {
grunt.verbose.writeln('Creating ' + dest.cyan);
grunt.file.mkdir(dest);
tally.dirs++;
} else {
grunt.verbose.writeln('Copying ' + src.cyan + ' -> ' + dest.cyan);
grunt.file.copy(src, dest, copyOptions);
if (options.mode !== false) {
fs.chmodSync(dest, (options.mode === true) ? fs.lstatSync(src).mode : options.mode);
}
tally.files++;
}
if (grunt.file.isDir(src)) {
}
grunt.verbose.writeln('Creating ' + dest.cyan);
grunt.file.mkdir(dest);
tally.dirs++;
} else {
grunt.verbose.writeln('Copying ' + src.cyan + ' -> ' + dest.cyan);
grunt.file.copy(src, dest, copyOptions);
if (options.mode !== false) {
fs.chmodSync(dest, (options.mode === true) ? fs.lstatSync(src).mode : options.mode);
}
tally.files++;
}
this.files.forEach(function (filePair) {
var isExpandedPair = filePair.orig.expand || false;
}
for (var i in modules) {
filePair.src.forEach(function (src) {
this.files.forEach(function (filePair) {
var isExpandedPair = filePair.orig.expand || false;
var dstModulePath = dstDir + "/" + modules[i] + "/" + src;
copyFunction(src, dstModulePath, isExpandedPair);
for (var i in modules) {
filePair.src.forEach(function (src) {
});
}
});
var dstModulePath = dstDir + "/" + modules[i] + "/" + src;
copyFunction(src, dstModulePath, isExpandedPair);
if (tally.dirs) {
grunt.log.write('Created ' + tally.dirs.toString().cyan + ' directories');
}
});
}
});
if (tally.files) {
grunt.log.write((tally.dirs ? ', copied ' : 'Copied ') + tally.files.toString().cyan + ' files');
}
if (tally.dirs) {
grunt.log.write('Created ' + tally.dirs.toString().cyan + ' directories');
}
if (tally.files) {
grunt.log.write((tally.dirs ? ', copied ' : 'Copied ') + tally.files.toString().cyan + ' files');
}
grunt.log.writeln();
grunt.log.writeln();
});

@@ -258,2 +255,2 @@

};
};
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