Tagged articles
6 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Sep 26, 2023 · Frontend Development

A Comprehensive Guide to Code Modification (Codemod) Tools and AST Transformations

This article explains the concept of codemod, outlines typical migration scenarios, details a step‑by‑step AST‑based workflow, and compares popular JavaScript code‑mod libraries such as Recast, jscodeshift, gogocode, and ast‑grep, helping developers choose the right tool for automated code upgrades.

ASTGoGoCodeJavaScript
0 likes · 13 min read
A Comprehensive Guide to Code Modification (Codemod) Tools and AST Transformations
Sohu Tech Products
Sohu Tech Products
Mar 10, 2021 · Frontend Development

Applying jscodeshift Codemods for Large‑Scale Frontend Refactoring

This article explains how to use codemod tools, especially jscodeshift, to automatically refactor a growing frontend codebase by replacing a monolithic constants package with per‑constant imports, covering the underlying AST concepts, step‑by‑step script creation, and practical CLI usage.

ASTcodemodfrontend
0 likes · 11 min read
Applying jscodeshift Codemods for Large‑Scale Frontend Refactoring
ByteFE
ByteFE
Mar 2, 2021 · Frontend Development

Using jscodeshift Codemod to Refactor Large‑Scale Frontend Projects

This article explains how to create and run a jscodeshift codemod that transforms imports of a bulky constants package into per‑constant imports, reducing bundle size in large frontend codebases by leveraging AST parsing, AST Explorer, and automated code modifications.

ASTcodemodjscodeshift
0 likes · 16 min read
Using jscodeshift Codemod to Refactor Large‑Scale Frontend Projects