filmov
tv
Writing custom codemod’s using Babel by Rohan Malhotra
Показать описание
15 March 2019 16:30, Training Room 2-2
This talk is about writing codemod’s using babel. Often we want to mass-refactor our codebases, for example, switching from one library to another like from glamorous to styled-components but it’s not as easy as doing a find/replace and requires a lot of manual work. A babel codemod will help you automate the tasks by running the transform for each file passed to it. In this talk, I’ll introduce you to babel-codemod, babel and AST’s and how I refactored our huge codebase from glamorous to styled-components in less than 1 hour. You can apply the same concepts to build a babel plugin or an eslint plugin.
Outline:
Intro to AST’s and other compilers concepts like parsing.
Intro to Babel.
Writing a babel plugin.
Video colour was distorted while recording. Sorry and thank you for the understanding.
This talk is about writing codemod’s using babel. Often we want to mass-refactor our codebases, for example, switching from one library to another like from glamorous to styled-components but it’s not as easy as doing a find/replace and requires a lot of manual work. A babel codemod will help you automate the tasks by running the transform for each file passed to it. In this talk, I’ll introduce you to babel-codemod, babel and AST’s and how I refactored our huge codebase from glamorous to styled-components in less than 1 hour. You can apply the same concepts to build a babel plugin or an eslint plugin.
Outline:
Intro to AST’s and other compilers concepts like parsing.
Intro to Babel.
Writing a babel plugin.
Video colour was distorted while recording. Sorry and thank you for the understanding.