sveltify

3.0.0 • Public • Published

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

/sveltify/

    Package Sidebar

    Install

    npm i sveltify

    Weekly Downloads

    35

    Version

    3.0.0

    License

    WTFPL

    Unpacked Size

    3.62 kB

    Total Files

    3

    Last publish

    Collaborators

    • tehshrike