svelte-lib-template

Svelte Lib Template

A minimalist template for quickly creating Svelte and SvelteKit related libraries

1: Find and replace content in the project using patterns ___TODO_[A-Z]+___ & \*\*_TODO_[A-Z]+_\*\* using your project's specific details. 2: npx npm-check-updates -u 3: npm i 4: npm run commit 5: Delete this quote from README.template.md

TODO_NAME

TODO_DESC.

Requires Svelte version 4.

Made to be Plundered

Fork, pillage, and plunder! Do whatever as long as you adhere to the project's permissive MIT license.

Components

<TemplateComponent>

Component description.

<script context="module">
  // Description of the module prop.
  export const moduleProp
</script>
<script>
  // Description of the prop.
  export let prop = "Default value"

  // Description of the set context.
  setContext("ctx", ...)
</script>

<!-- Default slot description. -->
<slot />

<!-- Named slot description. -->
<slot name="name" />
<TemplateComponent
  prop="Default value"
>
  <div />
  <div slot="name" />
</TemplateComponent>

Top categories

Loading Svelte Themes