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 4.2.0 to 4.2.1

26

build/cli.js

@@ -73,9 +73,21 @@ "use strict";

var jsUiContent = utils.readFile(jsUiFilePath);
return template
.replace("<!--diff2html-css-->", "<style>\n" + cssContent + "\n</style>")
.replace("<!--diff2html-js-ui-->", "<script>\n" + jsUiContent + "\n</script>")
.replace("//diff2html-fileListCloseable", "diff2htmlUi.fileListCloseable(\"#diff\", " + config.showFilesOpen + ");")
.replace("//diff2html-synchronisedScroll", "diff2htmlUi.synchronisedScroll(\"#diff\", " + config.synchronisedScroll + ");")
.replace("//diff2html-highlightCode", config.highlightCode ? "diff2htmlUi.highlightCode(\"#diff\");" : "")
.replace("<!--diff2html-diff-->", diffHTMLContent);
return [
{ searchValue: "<!--diff2html-css-->", replaceValue: "<style>\n" + cssContent + "\n</style>" },
{ searchValue: "<!--diff2html-js-ui-->", replaceValue: "<script>\n" + jsUiContent + "\n</script>" },
{
searchValue: "//diff2html-fileListCloseable",
replaceValue: "diff2htmlUi.fileListCloseable(\"#diff\", " + config.showFilesOpen + ");"
},
{
searchValue: "//diff2html-synchronisedScroll",
replaceValue: "diff2htmlUi.synchronisedScroll(\"#diff\", " + config.synchronisedScroll + ");"
},
{
searchValue: "//diff2html-highlightCode",
replaceValue: config.highlightCode ? "diff2htmlUi.highlightCode(\"#diff\");" : ""
},
{ searchValue: "<!--diff2html-diff-->", replaceValue: diffHTMLContent }
].reduce(function (previousValue, replacement) {
return utils.replaceExactly(previousValue, replacement.searchValue, replacement.replaceValue);
}, template);
}

@@ -82,0 +94,0 @@ function getInput(inputType, inputArgs, ignore) {

@@ -6,2 +6,3 @@ export declare function exists(filePath: string): boolean;

export declare function execute(cmd: string): string;
export declare function replaceExactly(value: string, searchValue: string, replaceValue: string): string;
//# sourceMappingURL=utils.d.ts.map

@@ -37,2 +37,6 @@ "use strict";

exports.execute = execute;
function replaceExactly(value, searchValue, replaceValue) {
return value.replace(searchValue, function () { return replaceValue; });
}
exports.replaceExactly = replaceExactly;
//# sourceMappingURL=utils.js.map
{
"name": "diff2html-cli",
"version": "4.2.0",
"version": "4.2.1",
"homepage": "https://www.github.com/rtfpessoa/diff2html-cli",

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

@@ -48,3 +48,3 @@ # diff2html-cli

* Manually download and import `rtfpessoa/diff2html/dist/diff2html.min.js` into your page
* Manually download and import [diff2html.min.js](https://raw.githubusercontent.com/rtfpessoa/diff2html/master/dist/diff2html.min.js) into your page

@@ -65,2 +65,3 @@ ## Setup

| --su | --summary | Show files summary | `closed`, `open`, `hidden` | `closed` |
| --d | --diffStyle | Diff style | `word`, `char` | `word` |
| --lm | --matching | Diff line matching type | `lines`, `words`, `none` | `none` |

@@ -67,0 +68,0 @@ | --lmt | --matchWordsThreshold | Diff line matching word threshold | | `0.25` |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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