Wallogit.com
2017 © Pedro Peláez
Beautifier and language aware code comparison tool for many languages. It also minifies and a few other things.
Try it online at http://prettydiff.com/., (*1)
Language aware code comparison tool for several web based languages. It also beautifies, minifies, and a few other things., (*4)
A Node.js command line utility is provided by api/node-local.js. This file can execute in the following modes:, (*5)
Add this code to your application, (*6)
var prettydiff = require("prettydiff"),
args = {
source: "asdf",
diff : "asdd",
lang : "text"
},
output = prettydiff(args);
Please see the barebones code samples, (*7)
Run in windows, (*8)
node api/node-local.js source:"c:\myDirectory" readmethod:"subdirectory" diff:"c:\myOtherDirectory"
Run in Linux and OSX, (*9)
node api/node-local.js source:"myDirectory" mode:"beautify" readmethod:"subdirectory" output:"path/to/outputDirectory"
To see a man page provide no arguments or these: help, man, manual, (*10)
node api/node-local.js h node api/node-local.js help node api/node-local.js man node api/node-local.js manual
To see only the version number supply only v or version as an argument:, (*11)
node api/node-local.js v node api/node-local.js version
To see a list of current settings on the console supply list as an argument:, (*12)
node api/node-local.js l node api/node-local.js list
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., (*13)
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., (*14)
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., (*15)
To run Pretty Diff using dom.js include the following two script tags and bind the global.prettydiff.pd.recycle() function to the executing event. Please refer to index.xhtml for an HTML example and documentation.xhtml for option and execution information., (*16)
<script src="lib/global.js" type="application/javascript"></script> <script src="lib/language.js" type="application/javascript"></script> <script src="lib/options.js" type="application/javascript"></script> <script src="lib/finalFile.js" type="application/javascript"></script> <script src="lib/safeSort.js" type="application/javascript"></script> <script src="ace/ace.js" type="application/javascript"></script> **(optional)** <script src="api/dom.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>
var global = {},
args = {
source: "asdf",
diff : "asdd",
lang : "text"
},
output = prettydiff(args);
cd prettydiff node test/lint.js
This project is mostly written by and managed by Austin Cheney and licensed under CC0 as of version 2.1.17. Please see license.txt for license langauge., (*17)