All Projects → TehShrike → sveltify

TehShrike / sveltify

Licence: other
Browserify transform for Svelte

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

sveltify

A Browserify transform allowing you to require Svelte templates.

Defaults to transforming all .html and .svelte files. You can overwrite the transformed extensions with the extensions argument.

If you're using svelte@3, you need sveltify@3, and vice versa.

Usage

browserify -t [ sveltify --extensions [.htmlz .svelte] ] myfile.js
{
  "browserify": {
    "transform": [
      [
        "sveltify",
        {
          "extensions": [
            ".html",
            ".svelte"
          ]
        }
      ]
    ]
  }
}

Svelte Options

Pass options to the Svelte compiler with the svelte property:

browserify -t [ sveltify --svelte [ --dev=true ] ] myfile.js
{
  "browserify": {
    "transform": [
      [
        "sveltify",
        {
          "svelte": {
            "dev": true
          }
        }
      ]
    ]
  }
}

License

WTFPL

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].