Codemod Crash Course: Automate Refactoring with jscodeshift

  Рет қаралды 323

I Code It

I Code It

Күн бұрын

In this video, we explore how to use jscodeshift for automated code transformations, following a Test-Driven Development (TDD) approach. We start with an introduction to codemods and then dive into writing and testing transformations with jscodeshift. We also cover Abstract Syntax Trees (ASTs) and the AST Explorer tool. By the end of this video, you'll know how to use the jscodeshift CLI to apply codemods to your codebase effectively.
*Table of Contents:*
- 01:04 - Short intro of codemod
- 04:00 - jscodeshift
- 08:54 - Write a test
- 10:48 - Test the transform
- 13:35 - Write the transform skeleton
- 14:21 - AST Explorer
- 17:17 - Implementing the transform
- 21:06 - Make the test pass
- 23:28 - Apply codemod to target codebase
- 25:16 - Wrapping up
Watch the full video to master jscodeshift and streamline your codebase refactoring process. Don't forget to like, comment, and subscribe for more coding tutorials!
Links:
- www.hypermod.io/
- astexplorer.net/
- github.com/fac...
- github.com/abr...
Subscribe to my newsletter for more articles and videos on refactoring and clean code tips: juntao.substac...
Additional Resources:
- React Anti-Patterns: www.amazon.com...
- React Clean Code Book: leanpub.com/re...
- Maintainable React Book: leanpub.com/ma...
- Mastering Maintainable React Course: www.udemy.com/...

Пікірлер: 2
Understanding Abstract Syntax Trees with ASTExplorer
11:29
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 43 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 25 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,7 МЛН
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 64 М.
James May finally drives the Tesla Cybertruck
14:15
James May’s Planet Gin
Рет қаралды 5 МЛН
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 291 М.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 158 М.
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН