Permalink
Browse files

node-local.js massively updated and can now perform batch operations …

…against directories
  • Loading branch information...
1 parent 22744a8 commit 40cd6c979a2ba9a5909da4d42be409b67dcd3d53 Austin Cheney committed Dec 11, 2012
Showing with 520 additions and 332 deletions.
  1. +13 −22 README.md
  2. +487 −290 api/node-local.js
  3. +7 −9 api/prettydiff.wsf
  4. +6 −5 lib/jspretty.js
  5. +7 −6 prettydiff.js
View
@@ -7,19 +7,25 @@ Try it online at http://prettydiff.com/ or [join the mailing list](https://group
Node.js
-------
-At the end of the Pretty Diff function include this code:
+Node.js support is provided by api/node-local.js. This file can execute
+in the following modes:
- if (typeof exports !== "string") {
- exports.api = function(x) {
- "use strict";
- return prettydiff(x);
- };
- }
+ * screen - code input is on the command line and output is to the command line
+ * filescreen - code input is in a file and the output is to the command line
+ * file - the input and the output reside in files
+ * directory - everything in a directory is processed into a specified output directory except ".", "..", and subdirectories
In your Node.js script include Pretty Diff with this code:
var prettydiff = require("prettydiff");
+From the command line execute api/node-local.js similar to these
+examples:
+
+ >node c:\\prettydiff\\api\\node-local.js source:"c:\mydirectory\myfile.js" readmethod:"file" diff:"c:\myotherfile.js"
+
+ >node c:\\prettydiff\\api\\node-local.js source:"c:\mydirectory\myfile.js" mode:"beautify" readmethod:"file" output:"c:\output\otherfile.js"
+
WSH
---
@@ -46,21 +52,6 @@ Pre-Inventory:
* For usage documentation please visit
http://prettydiff.com/documentation.php
-Inventory:
-----------
-
- * prettydiff.js - primary application for client and server processing
- * charDecoder.js - component
- * cleanCSS.js - component
- * csvbeauty.js - component
- * csvmin.js - component
- * diffview.css - component
- * diffview.js - component
- * fulljsmin.js - component
- * jspretty.js - component
- * markup_beauty.js - component
- * markupmin.js - component
-
License:
--------
Oops, something went wrong.

0 comments on commit 40cd6c9

Please sign in to comment.