From 0c9bb8f49df5d2f688633105046c9f02d855d954 Mon Sep 17 00:00:00 2001 From: Tejas Kumar Date: Sun, 17 Jun 2018 03:11:26 +0200 Subject: [PATCH] docs: add codemod to migration guide (#429) * Add codemod to migration guide * Update structure, add codemod --- other/EMOTION_MIGRATION.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/other/EMOTION_MIGRATION.md b/other/EMOTION_MIGRATION.md index 1e2b4bda..de2ec072 100644 --- a/other/EMOTION_MIGRATION.md +++ b/other/EMOTION_MIGRATION.md @@ -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. @@ -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'`