1.0.0 • Published 7 years ago

babel-plugin-auto-import-aphrodite v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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