1.0.6 ā€¢ Published 2 years ago

rollup-plugin-svelte-types v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

rollup-plugin-svelte-types

šŸ£ A Rollup plugin which generates type definitions for Svelte Components, including Props and Events.

Requirements

This plugin requires an LTS Node version (v8.0.0+) and Rollup v1.20.0+.

Install

Using npm:

npm install rollup-plugin-svelte-types --save-dev

Usage

Create a rollup.config.js configuration file and import the plugin:

import svelteDts from 'rollup-plugin-svelte-types';

export default {
  input: 'src/entry.js',
  // ...
  plugins: [
    svelteDts()
  ]
};

Then call rollup either via the CLI or the API.

Options

It's possible to use configure a few settings:

import svelteDts from 'rollup-plugin-svelte-types';

export default {
  input: 'src/entry.js',
  // ...
  plugins: [
    svelteDts({
        libRoot: './src', // The root directory to generate the type definitions for. Defaults to './'
        declarationDir: './dist/types' // The directory to place the generated definitions in. Defaults to './types'
    })
  ]
};

License

MIT

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago