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

diff2html-cli

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff2html-cli - npm Package Compare versions

Comparing version 1.4.3 to 1.4.4

2

package.json
{
"name": "diff2html-cli",
"version": "1.4.3",
"version": "1.4.4",
"homepage": "https://www.github.com/rtfpessoa/diff2html-cli",

@@ -5,0 +5,0 @@ "description": "Fast Diff to colorized HTML",

@@ -78,8 +78,11 @@ /*

if (baseConfig.summary) {
if (baseConfig.summary == 'hidden') {
config.showFiles = false;
} else {
config.showFiles = true;
config.showFilesOpen = baseConfig.summary == 'open';
}
var htmlContent = Diff2Html.getPrettyHtml(jsonContent, config);
return callback(null, that._prepareHTML(htmlContent));
return callback(null, that._prepareHTML(htmlContent, config.showFilesOpen));
} else if (baseConfig.format === 'json') {

@@ -92,3 +95,3 @@ return callback(null, JSON.stringify(jsonContent));

Diff2HtmlInterface.prototype._prepareHTML = function(content) {
Diff2HtmlInterface.prototype._prepareHTML = function(content, showFilesOpen) {
var templatePath = path.resolve(__dirname, '..', 'dist', 'template.html');

@@ -106,2 +109,3 @@ var template = utils.readFileSync(templatePath);

.replace('<!--diff2html-js-ui-->', '<script>\n' + jsUiContent + '\n</script>')
.replace('//diff2html-fileListCloseable', 'diff2htmlUi.fileListCloseable("#diff", ' + showFilesOpen + ');')
.replace('<!--diff2html-diff-->', content);

@@ -108,0 +112,0 @@ };

@@ -31,4 +31,5 @@ #!/usr/bin/env node

describe: 'Show files summary',
type: 'boolean',
default: 'true'
type: 'string',
choices: ['closed', 'open', 'hidden'],
default: 'closed'
}

@@ -35,0 +36,0 @@ })

Sorry, the diff of this file is not supported yet

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