babel-plugin-auto-import-aphrodite

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-auto-import-aphrodite

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • pmadar