Diffs folders of .html files to make sure they are the same
Diff folders of html files to make sure they are the same
npm install --save-dev html-diff
Array of folder objects to diff. Each object must contain the
path property to read files from and
name property to print when diffing.
Here is an example using
html-diff to ensure that the outputs from Jade and EJS templates produce the same html:
var diff = require'html-diff';if diffpath: 'EJSOutputFolder'name: 'EJS'path: 'JadeOutputFolder'name: 'Jade'console.log'No diff found :)';elseconsole.log'Folders have different contents :(';
This will log any differences between html file paths in the folders as well as differences in the content of html files which have the same path.
0.0.3 - Added return value to determine the result of the diffing for tests.
0.0.2 - Forgot to add colors as a dependency.
0.0.1 - Initial release