1.0.0 • Published 8 years ago
babel-plugin-auto-import-aphrodite v1.0.0
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-aphroditeUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["auto-import-aphrodite"]
}Via CLI
$ babel --plugins auto-import-aphrodite script.jsVia Node API
require('babel').transform('code', {
plugins: ['auto-import-aphrodite']
});1.0.0
8 years ago