Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

fela-beautifier

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-beautifier

Fela enhancer to beautify CSS output


Version published
Weekly downloads
1.4K
decreased by-55.94%
Maintainers
1
Weekly downloads
 
Created
Issues
4

fela-beautifier

npm downloads gzipped size

The beautifier enhancer is a developer tool that automatically formats the rendered CSS markup on every change. It uses cssbeautify to achieve this.

Installation

npm i --save fela-beautifier

Assuming you are using npm as your package mananger you can just npm install.
Otherwise we also provide a UMD. You can easily use it via npmcdn. It registers a FelaBeautifier global.

<!-- Fela (Development): Unminified version including all warnings -->
<script src="https://npmcdn.com/fela-beautifier@1.1.0/dist/fela-beautifier.js"></script>
<!-- Fela (Production): Minified version -->
<script src="https://npmcdn.com/fela-beautifier@1.1.0/dist/fela-beautifier.min.js"></script>

Example

Preview

Usage

import { createRenderer } from 'fela'
import beautifier from 'fela-beautifier'

const enhancer = beautifier({
  ident: '  ',
  openbrace: 'separate-line',
  autosemicolon: 'false'
})

const renderer = createRenderer({ enhancers: [enhancer] })

Configuration

Uses the same options as cssbeautify does.

optionvaluedefaultdescription
identstring (2 spaces)a string used for the indentation of the declaration
openbraceend-of-line, separate-lineend-of-lineplacement of open curly brace
autosemicolonbooleanfalseinsert semicolon after the last rule

License

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

FAQs

Package last updated on 08 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts