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

fela-beautifier

Package Overview
Dependencies
Maintainers
1
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

  • 4.3.1
  • Source
  • npm
  • Socket score

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

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 manager you can just npm install.
Otherwise we also provide a UMD. You can easily use it via unpkg. It registers a FelaBeautifier global.

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

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 Common License.
Created with ♥ by @rofrischmann and all the great contributors.

Keywords

FAQs

Package last updated on 22 Mar 2017

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