fela-preset-dev

Fela plugin preset for web applications

Usage no npm install needed!

<script type="module">
  import felaPresetDev from 'https://cdn.skypack.dev/fela-preset-dev';
</script>

README

fela-preset-dev

npm version npm downloads Bundlephobia

A Fela plugin preset for development.

Do not use this preset in production!

Contains (exact order)

Installation

yarn add fela-preset-dev

You may alternatively use npm i --save fela-preset-dev.

Usage

Simply use the spread operator to add the preset.

import { createRenderer } from 'fela'
import devPreset from 'fela-preset-dev'

const renderer = createRenderer({
  plugins: [
    // other plugins,
    ...devPreset
  ]
})

Configuration

Some plugins also accept some configuration options. We can use the createDevPreset factory and pass the options using the plugin name as a key.

import { createRenderer } from 'fela'
import { createDevPreset } from 'fela-preset-dev'

const renderer = createRenderer({
  plugins: [
    ...createDevPreset({
      'validator': [
        {
          logInvalid: true,
          deleteInvalid: true
        }
      ]
    })
  ]
})

License

Fela is licensed under the MIT License.
Documentation is licensed under Creative Commons License.
Created with ♥ by @robinweser and all the great contributors.