
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
prettydiff
Advanced tools
Language aware code comparison tool for several web based languages. It also beautifies, minifies, and a few other things.
Try it online at http://prettydiff.com/.
Language aware code comparison tool for several web based languages. It also beautifies, minifies, and a few other things.
A Node.js command line utility is provided by api/node-local.js. This file can execute in the following modes:
First install the prettydiff package locally
npm install prettydiff
Add this code to your application
var prettydiff = require("prettydiff"),
args = {
source: "asdf",
diff : "asdd",
lang : "text"
},
output = prettydiff.api(args);
First install the prettydiff package globally
npm install prettydiff -g
Run in windows
prettydiff source:"c:\myDirectory" readmethod:"subdirectory" diff:"c:\myOtherDirectory"
Run in Linux and OSX
prettydiff source:"myDirectory" mode:"beautify" readmethod:"subdirectory" output:"path/to/outputDirectory"
To see a man page provide no arguments or these: help, man, manual
prettydiff
prettydiff help
prettydiff man
To see only the version number supply only v or version as an argument:
prettydiff v
prettydiff version
Pretty Diff will first look for a .prettydiffrc file from the current directory in the command prompt. If the .prettydiffrc is not present in the current directory it will then look for it in the application's directory.
The .prettydiffrc first checks for JSON format. This allows a simple means of defining options in a file. It also allows a JavaScript application format so that options can be set conditionally.
Please feel free to use index.xhtml file to supplement dom.js. Otherwise, dom.js requires supplemental assistance to map DOM nodes from an HTML source. dom.js is fault tolerant so nodes mapped to the supplied index.xhtml don't need to be supported from custom HTML.
To run Pretty Diff using dom.js include the following two script tags and bind the pd.recycle() function to the executing event. Please refer to index.xhtml for an HTML example and documentation.xhtml for option and execution information.
<script src="api/dom.js" type="application/javascript"></script>
<script src="lib/safeSort.js" type="application/javascript"></script>
<script src="lib/csspretty.js" type="application/javascript"></script>
<script src="lib/csvpretty.js" type="application/javascript"></script>
<script src="lib/diffview.js" type="application/javascript"></script>
<script src="lib/jspretty.js" type="application/javascript"></script>
<script src="lib/markuppretty.js" type="application/javascript"></script>
<script src="prettydiff.js" type="application/javascript"></script>
Create a WSH script file using XML syntax and with a file extension of "WSF". This file must have a tag for each supported argument, must be capable of reading from a file, and retrieving dependencies.
http://prettydiff.com/api/prettydiff.wsf
Pretty Diff would be executed using the following on CLI:
cscript prettydiff.wsf
cscript prettydiff.wsf /source:"myFile.xml" /mode:"beautify"
var global = {},
args = {
source: "asdf",
diff : "asdd",
lang : "text"
},
output = prettydiff(args);
cd node_modules/prettydiff
npm test
@source: http://prettydiff.com/prettydiff.js
@documentation - English: http://prettydiff.com/documentation.xhtml
@licstart The following is the entire license notice for Pretty Diff.
This code may not be used or redistributed unless the following conditions are met:
If each and all these conditions are met use, extension, alteration, and redistribution of Pretty Diff and its required assets is unlimited and free without author permission.
@licend The above is the entire license notice for Pretty Diff.
FAQs
A language aware diff tool.
The npm package prettydiff receives a total of 3,660 weekly downloads. As such, prettydiff popularity was classified as popular.
We found that prettydiff demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.