Tool for merging HTML templates between front and back end. Uses Inquirer to prompt you with a series of questions, then launches Beyond Compare folder comparison with customized settings to aid you when merging.
$ npm install --save-dev template-tango
To make use of Folder Compare, install Beyond Compare (an awesome diffing GUI for Windows and Mac) and add it to the command-line.
git config --global diff.tool bc3
git config --global difftool.bc3.path "c:/Program Files/Beyond Compare 4/bcomp.exe"
var tt = defaulttt
For more examples of complex usage see 'src/_example-1' and 'src/_example-2'. Covers scenarios such as comparing a front end that has a mutli-tier folder structure, to a back end that has no folder structure and just matching file names (and visa-versa).
The settings inside
deps/BCSettings.bcpkg contain custom grammar for '.cshtml' and '.vash' files, which tells Beyond Compare to ignore eveything between these comment blocks:
Only Windows 10 has been tested. OSX will potentially be supported in future.
The most recent version on NPM Bombom was broken, so I've had to hack it a bit to get it to work. Currently lives inside "deps/bombom". Bombom is a library that adds a BOM (Byte Order Mark) to the beginning of files, so that files created in Visual Studio don't appear as different to regular files when being compared in Beyond Compare.
Edit "src/_example-1" with your own local paths, the run
npm run example-1 to see this app in action.
Unit tests can be run just by running
gulp, which will compile TypeScript and then run the tests.
If you need to add TypeScript typings, add them to "typings.json" and run
npm run typings.