babel-plugin-polished

by styled-components

styled-components /babel-plugin-polished

Compile polished helper functions at build time

134 Stars 10 Forks Last release: Not found MIT License 12 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

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

Via
.babelrc
(Recommended)

.babelrc

{
  "plugins": ["polished"]
}

Via CLI

$ babel --plugins polished script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["polished"]
});

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.