-
-
Notifications
You must be signed in to change notification settings - Fork 803
Closed
Labels
Milestone
Description
Build support for SvelteKit into Trigger.dev
Please make sure to use Typescript for all code
Task 1 - SvelteKit Adaptor
- Create a new folder in
packages
calledsvelteKit
- Create the adaptor for SvelteKit. Use this Next.js adaptor code as reference when creating yours. Include all setup configurations to fully support the framework, e.g. Next.js requires adaptor support for both App and Pages routers.
- Create a basic SvelteKit project that uses the adaptor in
examples/svelteKit
folder. Include a basic Job in Trigger.dev, e.g. a simple Job that just does a delay inside it. Screen grab the full Run dashboard page showing it successfully worked. Here are examples of how to do cross-project references in package.json and tsconfig.json. - Provide a screen grab of your terminal showing the Adaptor is working
Task 2 – Add a README.md file
- Create a new README.md file inside the
packages/svelteKit
folder and copy in the contents frompackages/nextjs/README.md
. Adjust the wording to reference SvelteKit where needed, including updating the the URLs.
Task 3 – Write the documentation
- Locate the
manual-setup-svelteKit.mdx
folder in/docs/_snippets/
. Use this file to write your documentation, overwriting any contents of that file. Follow the structure of this Next.js example for reference when writing yours. - Update the table at the bottom of the
client-adaptors.mdx
page with the framework you’ve worked on.
Task 4 – Update the webapp onboarding
- In the
route.tsx
page located in_app.orgs.$organizationSlug.projects.$projectParam.setup.svelteKit
replace the<FrameworkComingSoon/>
component with your new onboarding steps. Follow the same structure as the Next.js example when creating your own. Ignore the very top step for adding this framework to a new project, just focus on the steps to add it to an existing project (so don’t include the<RadioGroup/>
toggle selector at the top). Make sure you also include theuseProjectSetupComplete();
hook at the top of the page – this triggers a particle effect when the new job is successfully created and redirects to the Jobs list 🥳 . - In the
FrameworkSelector.tsx
file, add “supported” to the framework you’ve worked on.
JonL1