3.1.1 • Published 6 years ago

babel-plugin-import-css-to-jss v3.1.1

Weekly downloads
369
License
MIT
Repository
github
Last release
6 years ago

This is a simple babel plugin to inline css into js vis jss.

This plugin is very much experimental due to use of the Babel6 API - largely undocumented. Contributions are welcome.

Usage

The following command will convert everything in the src folder to lib using babel and our plugin.

babel src/ -d lib/ --presets stage-0,es2015,react --plugins import-css-to-jss

Every js file that has a statement such as:

import styles from './styles.css'

will be roughtly translated to:

var styles = {
    // the css file converted to JSS
}

Use Cases

The only use case of this plugin is to be able to bundle css styles with your js components. It is good for portability.

3.1.1

6 years ago

3.1.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago