namikingsoft / babel-plugin-polished

Compile polished helper functions at build time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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"]
});

About

Compile polished helper functions at build time

License:MIT License


Languages

Language:JavaScript 100.0%