Important
Community add-ons are currently not supported. Please see #184 for details.
Important
This template's dependencies may not be up-to-date; be sure to update them to the latest! If you get stuck, check out the implementations of official add-ons.
The add-on template for community add-ons for sv.
Use degit to clone the template:
npx degit sveltejs/cli/community-addon-template addon-nameTo run the add-on, we'll first need a project to apply it to.
Create the project with the following script:
npm run create-tempThis will create a SvelteKit project in the temp directory.
To execute the add-on, run:
npm startWhen you're ready to publish your add-on to npm, run:
npm publishYour published add-on can now be used by anyone!
To execute the newly published package with sv, run:
npx sv add --community npm:addon-package-nameAfter that, feel free to open a pull request to sv and add your add-on to the community list.
Community add-ons are not permitted to have any external dependencies outside of sv. If the use of a dependency is absolutely necessary, then they can be bundled using a bundler of your choosing (e.g. Rollup, Rolldown, tsup, etc.).