It sometimes happens that something that was not part of either the documentations or the test suite suddenly becomes part of the specifications like the filter tag or the macros rework issues, putting Twing and all other non-reference implementations in the uncomfortable position of having to deal with a potential breaking change. This is not an easy task due to the nature of Twig specifications: they don't exist officially and can only be deduced from the public documentation, the source code documentation and the test suite of the PHP reference implementation. Twing aims at implementing Twig specifications perfectly, without compromise. Once loaded by the browser, Twing is available under the global Twing variable. Use jsdelivr CDN to include Twing in your HTML document: The recommended way to install Twing is via npm:Ĭonst from 'twing' will work in both node.js and the browser - once bundled in the latter case. Twing needs at least node.js 8.0.0 to run. A maintainability-first engine that pass 100% of the TwigPHP integration tests, is as close as possible to its code structure and expose an as-close-as-possible API. Its code architecture and philosophy should then be as close as possible as the PHP implementation.įinally, we believe that a first-class Twig engine should allow users to build on their experience with TwigPHP and get support from the huge community that comes with it. We also believe that a first-class Twig engine should be able to catch-up easily when Twig specifications evolve. That means that it should implement 100% of the syntax defined by the language specifications and that it should render that syntax using PHP logic. We believe that a first-class Twig engine should be able to render any template to the exact same result as the official PHP engine. First-class Twig engine for Node.js Philosophy behind Twing
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |