svelte-component-budget

Svelte Component Budget

SvelteJS preprocessor to control component's size (loc).

Install

npm i svelte-component-budget --save-dev
yarn add svelte-component-budget

Usage

import componentBudget from 'svelte-component-budget';

module.exports = {
    compilerOptions: {
     ...
    },
    preprocess: [
        componentBudget(),
    ]
};

Options

  • budget - line of code budget for Svelte components (default: 200).
  • include - array of regexps to match with filenames (default: []).
  • exclude - array of regexps to match with filenames (default: []).

License

MIT © PaulMaly

Top categories

Loading Svelte Themes