12.0.3 • Published 4 years ago

@fela-next/fela-preset-dev v12.0.3

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

fela-preset-dev

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-next/fela'
import devPreset from '@fela-next/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-next/fela'
import { createDevPreset } from '@fela-next/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 Common License. Created with ♥ by @robinweser and all the great contributors.