-
-
Notifications
You must be signed in to change notification settings - Fork 876
Description
We have a SvelteKit package (@trigger.dev/sveltekit) which allows you to use Trigger.dev easily with SvelteKit.
We want to add a Svelte package (@trigger.dev/svelte) that adds hooks that can be used from your UI. The functionality will be exactly the same as the React package.
Existing branch that should be used as a starting point
There is a branch where 90% of the work has already been done by @Chigala: https://github.com/triggerdotdev/trigger.dev/tree/feat/svelte-package
What needs to be done still
The current package won't publish to npm
When publish is called, it runs the package script:
"package": "svelte-kit sync && svelte-package && publint",This fails with an error, which means the package can't be published to npm.
Someone who has experience creating Svelte packages would be ideal, as I'm not sure the best to approach this. How does this relate to tsup which we also have in here? I'm guessing we don't need both but not sure how to achieve this.
- Get the packaging working, so it can be published to npm
Adding guide docs for the hooks
- Add a new group to the docs called "UI hooks" that lives in the same place as "React hooks" does now.
- Add an Introduction page inside UI hooks, that gives an overview of what the UI hooks are (taking contact from the React hooks intro) and then links using two components to the child groups: React hooks and Svelte hooks
- Add a Svelte hooks guide that is based on the existing React hooks guide pages
Reference in the docs:
- Live URL: https://trigger.dev/docs/documentation/guides/react-hooks
- mint.json where the structure of the docs is defined: https://github.com/triggerdotdev/trigger.dev/blob/feat/svelte-package/docs/mint.json
- Readme for the docs, with how to run it: https://github.com/triggerdotdev/trigger.dev/blob/feat/svelte-package/docs/README.md
- React hook overview page: https://github.com/triggerdotdev/trigger.dev/blob/feat/svelte-package/docs/documentation/guides/react-hooks.mdx
Adding SDK reference for the Svelte package
- Create a reference for the Svelte package that is equivalent to the React package
References: