npm.io
1.2.0 • Published 7 years ago

@wzuo/babel-plugin-polished

Licence
MIT
Version
1.2.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
138

babel-plugin-polished

Compile away polished helpers.

Example

In

import * as polished from 'polished';

let value = polished.clearFix();

Out

let value = {
  '&::after': {
    clear: 'both',
    content: '',
    display: 'table'
  }
};

Installation

$ npm install babel-plugin-polished

Usage

.babelrc

{
  "plugins": ["polished"]
}
Via CLI
$ babel --plugins polished script.js
Via Node API
require("babel-core").transform("code", {
  plugins: ["polished"]
});

Keywords