Pretty Diff

Last updated
Pretty Diff
Developer(s) Austin Cheney
Initial releaseMarch 3, 2009;15 years ago (2009-03-03)
Stable release
101.0.0 / April 21, 2019;5 years ago (2019-04-21)
Repository
Written in TypeScript
Platform Web platform
Type Data comparison, prettification, minification
License CC0
Website prettydiff.com OOjs UI icon edit-ltr-progressive.svg

Pretty Diff is a language-aware data comparison [1] [2] utility implemented in TypeScript. The online utility is capable of source code prettification, minification, and comparison of two pieces of input text. It operates by removing code comments from supported languages and then performs a pretty-print [3] operation prior to executing the diff algorithm. An abbreviated list of unit tests is provided. [4] The documentation [5] claims the JavaScript pretty-print operation conforms to the requirements of JSLint.

Contents

As Pretty Diff is written entirely in TypeScript, the application executes in a web browser or on command line using a stand-alone JavaScript interpreter, such as Node.js.

As of March 23, 2016 Pretty Diff stated it would abandon NPM in response to a list of disagreements. [6] On April 18, 2016 in parallel to the release of Pretty Diff version 2.0.0. the NPM package is updated to artificial version 99 where it is effectively locked into version 1.16.37. [7] [8]

The source code is published at the Pretty Diff GitHub repository. [9]

Alternatives

See also

Related Research Articles

In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. The utility displays the changes in one of several standard formats, such that both humans or computers can parse the changes, and use them for patching.

Minification is the process of removing all unnecessary characters from the source code of interpreted programming languages or markup languages without changing its functionality. These unnecessary characters usually include whitespace characters, new line characters, comments, and sometimes block delimiters, which are used to add readability to the code but are not required for it to execute. Minification reduces the size of the source code, making its transmission over a network more efficient. In programmer culture, aiming at extremely minified source code is the purpose of recreational code golf competitions.

LXR Cross Referencer, usually known as LXR, is a general-purpose source code indexer and cross-referencer for code comprehension that provides web-based browsing of source code, with links to the definition and usage of any identifier.

<span class="mw-page-title-main">YUI Library</span>

The Yahoo! User Interface Library (YUI) is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting. YUI includes several cores CSS resources. It is available under a BSD License. Development on YUI began in 2005 and Yahoo! properties such as My Yahoo! and the Yahoo! front page began using YUI in the summer of that year. YUI was released for public use in February 2006. It was actively developed by a core team of Yahoo! engineers.

JSDoc is a markup language used to annotate JavaScript source code files. Using comments containing JSDoc, programmers can add documentation describing the application programming interface of the code they're creating. This is then processed, by various tools, to produce documentation in accessible formats like HTML and Rich Text Format. The JSDoc specification is released under CC BY-SA 3.0, while its companion documentation generator and parser library is free software under the Apache License 2.0.

A CSS framework is a library allowing for easier, more standards-compliant web design using the Cascading Style Sheets language. Most of these frameworks contain at least a grid. More functional frameworks also come with more features and additional JavaScript based functions, but are mostly design oriented and focused around interactive UI patterns. This detail differentiates CSS frameworks from other JavaScript frameworks.

<span class="mw-page-title-main">Google Closure Tools</span> JavaScript developer toolkit

Google Closure Tools is a set of tools built with the goal of helping developers optimize rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps. As of 2023, the project had over 230K LOCs not counting the embedded Mozilla Rhino compiler.

<span class="mw-page-title-main">Node.js</span> JavaScript runtime environment

Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser.

npm JavaScript package manager

npm is a package manager for the JavaScript programming language maintained by npm, Inc., a subsidiary of GitHub. npm is the default package manager for the JavaScript runtime environment Node.js and is included as a recommended feature in the Node.js installer.

<span class="mw-page-title-main">Amber Smalltalk</span>

Amber Smalltalk, formerly named Jtalk, is an implementation of the programming language Smalltalk-80, that runs on the JavaScript runtime of a web browser. It is designed to enable client-side development using Smalltalk. The programming environment in Amber is named Helios.

<span class="mw-page-title-main">Brackets (text editor)</span> Editor for web development

Brackets is a source code editor with a primary focus on web development. Created by Adobe Inc., it is free and open-source software licensed under the MIT License, and is currently maintained on GitHub by open-source developers. It is written in JavaScript, HTML and CSS. Brackets is cross-platform, available for macOS, Windows, and most Linux distributions. The main purpose of Brackets is its live HTML, CSS and JavaScript editing functionality.

<span class="mw-page-title-main">GraalVM</span> Virtual machine software

GraalVM is a Java Development Kit (JDK) written in Java. The open-source distribution of GraalVM is based on OpenJDK, and the enterprise distribution is based on Oracle JDK. As well as just-in-time (JIT) compilation, GraalVM can compile a Java application ahead of time. This allows for faster initialization, greater runtime performance, and decreased resource consumption, but the resulting executable can only run on the platform it was compiled for.

<span class="mw-page-title-main">Atom (text editor)</span> Free and open-source text and source code editor

Atom is a free and open-source text and source-code editor for macOS, Linux, and Windows with support for plug-ins written in JavaScript, and embedded Git control. Developed by GitHub, Atom was released on June 25, 2015.

ContentTools is an open-source WYSIWYG editor for HTML content written in JavaScript/CoffeeScript by Anthony Blackshaw of Getme Limited.

gulp is an open-source JavaScript toolkit, used as a streaming build system in front-end web development.

Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification, compilation, unit testing, and linting. It uses a command-line interface to run custom tasks defined in a file. Grunt was created by Ben Alman and is written in Node.js. It is distributed via npm. As of October 2022, there were more than 6,000 plugins available in the Grunt ecosystem.

JSDelivr is a public content delivery network (CDN) for open-source software projects, including packages hosted on GitHub, npm, and WordPress.org. JSDelivr was created by developer Dmitriy Akulov.

Next.js is an open-source web development framework created by the private company Vercel providing React-based web applications with server-side rendering and static rendering.

<span class="mw-page-title-main">Deno (software)</span> Secure JavaScript and TypeScript runtime

Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language. Deno was co-created by Ryan Dahl, who also created Node.js.

Embedded JavaScript (EJS) is a web templating system or templating language that allows developers to code HTML markup with simple JavaScript. Unlike other engines that use templates, EJS is very simple, light, fast, flexible and it is an efficient tool for rendering templates on the server side. It mainly uses logic from JavaScript, which makes benefits for developers who already know JavaScript language before. EJS is frequently used in Node.js, it means that any platform that supports JavaScript language also supports EJS.

References

  1. "Slodive - 20 Beneficial Web Development Tools".
  2. "Noupe, The Curious Side of Smashing Magazine - 25+ Useful Document and File Comparison Tools". 2 April 2024.
  3. "Stack Overflow - Online code beautifier and formatter".
  4. "Pretty Diff samples". Archived from the original on 2012-07-31. Retrieved 2012-07-12.
  5. "documentation". Archived from the original on 2012-07-31. Retrieved 2012-07-07.
  6. "Investigate alternatives to NPM · Issue #291 · prettydiff/prettydiff · GitHub". GitHub .
  7. "Release Pretty Diff v2.0.0 Published · prettydiff/prettydiff · GitHub". GitHub .
  8. "prettydiff - npm". 2 September 2019.
  9. "Pretty Diff GitHub repository". GitHub .