Provides a bare-bones Foundry module template repo to get set up with using TyphonJS Runtime Library and Svelte on Foundry VTT with ES Modules.
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 bare-bones 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.
id
in module.json
to match your new Foundry package ID.module.json
to your new module name../vite.config.mjs
update s_PACKAGE_ID
which references modules/template-svelte-esm
to your new module ID.
in step #3 above. Also provide a short unique hash ID for s_SVELTE_HASH_ID
; suggestion: base it off your package ID.npm install
build
to create the production bundle or dev
to run in developer mode which uses esbuild
&
HMR (hot module replacement) to dynamically update your running module in real time for all Svelte related components. Template Svelte (ESM)
or whatever title you set in step #4 visible in
your modules list.Manage Modules
.ready
Foundry hook from the entry
point: ./src/index.jsNot a lot as this is a bare-bones setup allowing you to further modify this module to your own liking. It provides
the basic build setup and a "dummy" SvelteApplication instance. The best thing to do is to change your repo name to the
ID of your new module and update id
in module.json
to match your new module ID.
The TyphonJS Runtime Library (TRL) brings an exciting new library resource for all Foundry VTT developers to build advanced modules and game systems using Svelte. A Svelte UI component library built for Foundry and extensions to the core Foundry UI / Application framework make it easy to create declarative Svelte based UIs in a method familiar to Foundry VTT developers. The core UI component framework contains reactive "application shells" that provide an enhanced ability to control your UI / window experience including intro and outro transitions along with support key UI elements like context menus and a new backward compatible and API compliant Dialog component that features a modal dialog option.
TRL is innovative as it delivers a runtime library module for Foundry that packages up the runtime in a way that can be shared across any number of modules / game systems utilizing it thereby saving a lot of space in any given module or game system. Optionally, it is possible to also bundle TRL directly into your module or game system. The TRL is both a Foundry library module and an NPM package providing the development dependency utilized for code
9815 ln -s ~/mygit/starforged/reference/template-svelte-esm ~/mygit/foundrydata/Data/modules/template-svelte-esm 9822 ln -s ~/mygit/starforged/reference/essential-svelte-esm ~/mygit/foundrydata/Data/modules/essential-svelte-esm 9857 history | grep ln 9858 ln -s ~/mygit/starforged/reference/foundryvtt-pin-cushion ~/mygit/foundrydata/Data/modules/pin-cushion