Open aaqibhabib opened 9 years ago
{
instead of {{
.{#friends}
{name}, {age}{~n}
{/friends}
@aaqibhabib Would you be able to provide some examples in context? I need to know if the templating code is used in HTML or it is its own file. I would not be able to support this at all if it is embedded directly in JavaScript.
@prettydiff LinkedIn's fork of Dust is the correct version, https://github.com/linkedin/dustjs . Here is their documentation https://github.com/linkedin/dustjs/wiki/Dust-Tutorial & http://www.dustjs.com/
http://akdubya.github.io/dustjs/ is no longer maintained, so is basically deprecated.
@Glavin001 comment about being like Handlebars is correct. I believe the syntax is basically the same, only the dust compiler can handle some additional basic logic provided by the Helpers.
Implementation is the same as well, can be in HTML and its own file for partials, just like Handlebars. On the JS side it should beautify like a regular js file(I believe).
@aaqibhabib @JBlackCat I have started work on this and some preliminary Dust.js support is ready to review. Please see the details at https://github.com/prettydiff/prettydiff/issues/108
I just published Dust.js support in v1.12.13. Support for Dust.js is hidden behind a new option dustjs http://prettydiff.com/documentation.xhtml#dustjs
The option is automatically set to true if the language is dustjs or if the language is auto and Dust.js can be automatically detected.
I also added a separate and unrelated option to preserve text in markup documents: textpreserve
any progress on adding dustjs support?
If DustJS is now supported by PrettyDiff, doesn't that mean a file just needs to be added to src/languages
to add support to this package?
Add support for DustJS templating for atom-beautify.