https://github.com/restspace/svelte-script-lib-template
https://github.com/restspace/svelte-script-lib-template
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/restspace/svelte-script-lib-template
- Owner: restspace
- Created: 2022-09-02T19:32:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-02T19:32:36.000Z (almost 4 years ago)
- Last Synced: 2025-10-06T18:55:43.027Z (8 months ago)
- Language: HTML
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Svelte + TS + Vite > class library
This is a variation of the standard npm install vite TS/Svelte library. Its build output is a js file which can be loaded as a script on a webpage and then used in code on the page as a class e.g.
import { SvelteComponent } from "https://myfiles.com/path/to/svelteComponent.js";
const x = new SvelteComponent({
target: document.getElementById("container"),
props: {
prop1: prop1val
}
});