-
Notifications
You must be signed in to change notification settings - Fork 3
Other templating engines #8
Comments
Relevant Issue: #5 |
Let's break down Mustache support for two separate things: generating from core templates (e.g. index.mustache) and generating patterns. Mustache must always be used to generate core templates. Support for other template engines must be limited to generating patterns. As for generating patterns, Mustache with a specific "pattern loader" (e.g. support for pattern partial syntax, style modifiers, and pattern parameters) must be supported to be in compliance with Pattern Lab spec. This will allow us to share assets/patterns/docs/starter kits amongst each port. Mustache must also be the default engine when a port is installed. I'm leaving the door open for other engines for generating patterns if you want to support them on a per port basis as it makes sense for your underlying tech or task. They should be able to support, at a minimum, the pattern partial syntax. A decent example of this is Twig support in the |
@dmolsen - Thanks for the answer, this is how I had interpreted it, and how I was planning to introduce the more widely used (in .NET anyway) Razor templating syntax into the .NET version |
The recent changes to the PHP edition to support front-end and back-end "extensions/plugins" has seen me drop Mustache as a core template engine. Basically, whatever someone chooses to load as a "pattern engine" for their install of Pattern Lab should now be able to parse the "view all" views and patterns. I haven't updated spec but feel free to drop Mustache as a requirement. You can use whatever engine makes sense for your platform and use it for everything. There is also no need to match certain features like "pattern parameters" if it doesn't make sense for your pattern engine choice. For example, it probably won't make sense for the Twig pattern engine for the PHP edition. This is how things are falling out for an organization:
I'm now using composer to manage dependencies. If you decide you want to add your own package management config to a repo like More changes are on the way. The PS - I apologize, this turned into a status update. But, hey, now you guys know what's going on :) /cc @bradfrost |
And for further updates see issue 51 on the PHP repo. |
@dmolsen Definitely interested in using this - will think through it and let you know if I have questions. :) |
Related to this… the If you curious to get a better explanation of the various components that will make up a Pattern Lab project in the future I tried to write a little something up about them. |
@dmolsen - With regards to handling other templating engines; had you envisaged ports supporting engines that were specific to their technology stack/platform, or would each port need to support all engines to comply with the spec?
The text was updated successfully, but these errors were encountered: