Provides a barebones Foundry VTT module template repo to get set up with using the TyphonJS Runtime Library, Svelte, and Typescript.
The Foundry types being used is foundry-vtt-types. The League's community types have been a long running work in progress. If you are developing for the PF2E game system and / or would like to try out different types granted w/ some PF2E specifics please see template-svelte-ts-pf2e.
Triple licensed under the CC0, MIT, or Unlicense. This repo is intended as public domain / freely available starter code that you can use for any project you choose and licensed however you see fit with no restrictions.
Getting started with a new library or development methodology can be difficult. This template repo contains a
barebones setup suitable to start working on your own module. Certainly do check out
Essential Svelte (ESM) for more involved demos that show specific
concepts available with Svelte and TRL. Please stop by the
Discord server to ask any questions or receive support on all things TRL / Svelte / Foundry.
Don't skip step 9.... You have read this list right?
Data/modules directory (make sure to keep the name
of your repo as the folder installed in the modules directory).id in module.json to match your new Foundry package ID.module.json.template-svelte-ts-league.lock to the new ID of your module. This prevents Foundry from overwriting your development
repo if you have also released your Foundry package../vite.config.ts update s_SVELTE_HASH_ID to provide a short unique hash ID; suggestion: base it off your package ID.npm installbuild to create the production bundle. This is required to initially build assets into dist/.dev to start the Vite dev server which uses esbuild &
HMR (hot module replacement) to dynamically update your running module in real time for all Svelte related components.
Don't forget to enable language hot reload in the Foundry server admin for hot reloads for language translation files.Template Svelte (TS) or whatever title you set in step #4 visible in
your modules list.Manage Modules.ready Foundry hook from the entry.module.json using SemVer..github/workflows/main.yml to change the bundling process.https://github.com/<YOUR GITHUB USER NAME>/<YOUR REPO>/releases/latest/download/module.json.foundry-vtt-types does have releases on NPM. Depending on the state of the types you may wish to directly install from the repo.