Provides a barebones Foundry VTT module template repo to get set up with using the TyphonJS Runtime Library, Svelte, and Typescript for Foundry v13+.
The Foundry types being used is foundry-pf2e. The League's community types will work as well if you can find a stable version. Please see the TS League template repo to work with the League types.
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-pf2e.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-pf2e only provides a direct Github install / linked in package.json. Run npm update to get the latest.