babel-plugin-auto-import-aphrodite
v1.0.0
Published
Auto import aphrodite - CSS in JS library
Downloads
2
Readme
babel-plugin-auto-import-aphrodite
Auto-import StyleSheet
and css
from Aphrodite.
Before:
const style = StyleSheet.create({
display: 'none'
})
After:
import { StyleSheet, css } from 'aphrodite/no-important'
const style = StyleSheet.create({
display: 'none'
})
Installation
$ npm install babel-plugin-auto-import-aphrodite
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["auto-import-aphrodite"]
}
Via CLI
$ babel --plugins auto-import-aphrodite script.js
Via Node API
require('babel').transform('code', {
plugins: ['auto-import-aphrodite']
});