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

fela-beautifier

Package Overview
Dependencies
Maintainers
2
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-beautifier

Fela enhancer to beautify CSS output

  • 12.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-45.86%
Maintainers
2
Weekly downloads
 
Created
Source

fela-beautifier

Deprecated: This package is deprecated since we no longer render CSS to textContent in devMode but use insertRule all the way. It will be removed with the next major version release.

npm version npm downloads Bundlephobia

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

Installation

yarn add fela-beautifier

You may alternatively use npm i --save fela-beautifier.

Usage

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

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

Configuration

Options

Uses the same options as cssbeautify does.

OptionValueDefaultDescription
ident(string) (2 spaces)a string used for the indentation of the declaration
openbraceend-of-line, separate-lineend-of-lineplacement of open curly brace
autosemicolon(boolean)falseinsert semicolon after the last rule
Example
import { createRenderer } from 'fela'
import beautifier from 'fela-beautifier'

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

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

Example

Preview

License

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

Keywords

FAQs

Package last updated on 23 Feb 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc