Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
docs: add codemod to migration guide (#429)
Browse files Browse the repository at this point in the history
* Add codemod to migration guide

* Update structure, add codemod
  • Loading branch information
Tejas Kumar authored and Kent C. Dodds committed Jun 17, 2018
1 parent baa89d2 commit 0c9bb8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions other/EMOTION_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ yarn add babel-plugin-emotion
# if you use ThemeProvider
yarn add emotion-theming
```

### Babel
babel-plugin-emotion is optional but recommended because it enables the element shorthand(`styled.div` instead of `styled('div')`), the css prop, performance optimizations and developer experience improvements like labels.

Expand All @@ -40,6 +41,9 @@ If you want to use babel-plugin-emotion, you will need to make some adjustments

If you need more details see [Install Emotion](https://emotion.sh/docs/install)

## Codemod
[There is a codemod](https://github.com/TejasQ/babel-plugin-glamorous-to-emotion) that aims to help migrate an entire existing codebase over to emotion from glamorous. It may be worth looking into this in order to have a quicker and easier migration.

## Imports

If you are in react `import glamorous from 'glamorous'` becomes `import styled from 'react-emotion'`
Expand Down

0 comments on commit 0c9bb8f

Please sign in to comment.