minify-css.macro
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

minify-css.macro

Code coverage Build status NPM Version MIT License

npm i minify-css.macro

A babel plugin for removing the whitespace from a CSS-generating tagged template literal while preserving function/variable instances.

Prerequisites

Using this plugin requires that you are also using babel-plugin-macros (included in create-react-app by default)

Usage

// [Input]
import css from 'minify-css.macro'
 
const getStyle = (theme) => css`
  text-align: center;
  font: ${theme.font.primary};
`
 
// [Output]
 
const getStyle = (theme) => 'text-align:center;font:' + theme.font.primary + ';'

LICENSE

MIT

Package Sidebar

Install

npm i minify-css.macro

Weekly Downloads

3

Version

1.0.10

License

MIT

Unpacked Size

29.9 kB

Total Files

17

Last publish

Collaborators

  • jaredlunde