Skip to content

asherccohen/babel-plugin-polished

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-polished-fork

Compile away polished helpers. This is a fork from the original package to overcome dependency stuck at v.1.0.0 of polished package.

Installation

$ npm install  babel-plugin-polished-fork

or

$ yarn add  babel-plugin-polished-fork

Usage

Via .babelrc (Recommended)

.babelrc

{
  	"plugins": [
		[
			"babel-plugin-polished-fork",
			{
				"module": "polished"
			}
		]
	]
}

Via CLI

$ babel --plugins polished script.js

Example

In

import * as polished from 'polished';

let value = polished.clearFix();

or

import { clearFix } from 'polished';

let value = polished.clearFix();

Out

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

About

Compile polished helper functions at build time

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%