Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.36 KB

svelte.md

File metadata and controls

39 lines (26 loc) · 1.36 KB

Svelte Extension

Task Definitions: None
Template Definitions: 'svelte'
Batcher Definitions: None

Builds a Svelte template into a JS and CSS file.

Svelte Template

Template Options

  • auto-install (Boolean, default: true): Whether to automatically install svelte if not present (using the npm extension). The global npm extension auto-install option will take precedence here if not otherwise set.
  • source-maps (Boolean, default: true): Whether to output source maps.
  • svelte-config (String | Boolean, default: false): Custom Svelte configuration file to use, when set to true defaults to svelte-config.js.
  • svelte-preprocess (Boolean, default: true for no svelte-config, false when svelte-config is set): Automatically applies the svelte-preprocess default Svelte preprocessor.

Example

chompfile.toml

version = 0.1

extensions = ['[email protected]:svelte']

[[task]]
name = 'build:svelte'
target = 'lib/#.js'
dep = 'src/#.svelte'
template = 'svelte'

Ejection

When ejecting the template, the Svelte API JS wrapper task will be output without auto-installation.

Roadmap

This extension is currently very much a prototype. It would be amazing if someone with Svelte experience is interested in improving it.