preact-cli
preact-cli copied to clipboard
[Feature] Provide a template to create libraries
Do you want to request a feature or report a bug?
Feature
If this is a feature request, what is motivation or use case for changing the behaviour?
The idea behind this feature is to have a consistent way for library authors to scaffold a new library based on preact. Even though it is totally possible for two different library authors to adopt completely different approach and still produce their respective libraries, but having something consistent would help new library authors to focus on the functionality instead of trying to figure out how to setup everything, basically provide the same value that the default template provides for application authors.
While it's a little rough and probably needs a few PRs, that's essentially what the Widget template is for. The dist command will bundle it into something that can be used as a library in other Preact apps.
Edit: If it's still supported. Not entirely sure that it is, taking a second look.
its broken with 3.0 will need some work to enable it again
I can look into giving it a bit of help later, to get it up-to-date.
@thesobercoder I have created a PR that gets the template back up-to-date. Check it out if you have a few minutes. Let me know if you notice any issues with it.
Hopefully this was the sort of thing you were looking for.