guybedford / chomp

'JS Make' - parallel task runner for the frontend ecosystem with a JS extension system.
https://chompbuild.com
Apache License 2.0
138 stars 7 forks source link

Template library #6

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

Once templates are implemented via https://github.com/guybedford/chomp/issues/5, we can expose an internal template registry / library. This could just be a simple manifest that maps string names to template definitions. The registry itself would be synced from a main URL or git repo that anyone could send a PR to to add a template.

Another way around this could be to have a chp template install github:some/pkg style workflow. Or possibly a chp template --update where it syncs the template registry.

This is the most important UX to get right to enable a real ecosystem of composable build primitives.

guybedford commented 2 years ago

I think I'm just going to implement an internal template library that comes "out of the box".

Custom templates can then be defined in the local file as well.

We could possibly have a more advanced registry / includes system in future, but for now that works for me and will be good to bring the community together into a single place to ensure best practices (ideally if that works out!).

guybedford commented 2 years ago

Added in https://github.com/guybedford/chomp/commit/d6320c9f064da9720351ff5f0c91b0449bf117bf, with the chomp:svelte template included by default.