minify-css.macro
v1.0.10
Published
A babel plugin for removing the whitespace from a CSS-generating tagged template literal while preserving functions/variables instances
Downloads
43
Maintainers
Readme
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