# AST Transformations
# Constant Folding
See chapter Constant Folding
# Master the AST Lectures
See chapter Master the AST lecture series
# ast-types
See chapter ast-types
# JSCodeshift and Recast
See chapter JSCodeshift and Recast
# References
# JSCodeshift
- Codeshift at GitHub
- JSCodeshift API Doc (opens new window)
- Write Code to Rewrite Your Code: jscodeshift Examples: removing console.log, replacing imported method calls, from positional parameters to parameter object
- jscodeshift "hello world" example
- jscodeshift cpojer/js-codemod no-vars.js Conservatively converts
var
toconst
orlet
.jscodeshift -t js-codemod/transforms/no-vars.js <file>
# Rajasegar works
- Migrating large codebase with Codemods (opens new window) YouTube video. Talk at JSFoo Pune 2020. On component architecture, performance, security for front-end, and emerging trends. Rajasegar Chandran.
- Slides (opens new window)
- Awesome codemods (opens new window) at rajasegar/awesome-codemods
- AST-Builder (opens new window) by Rasegar. My fork at https://github.com/ULL-ESIT-PL/ast-builder (opens new window), deployment at https://ull-esit-pl.github.io/ast-builder/ (opens new window)
# Riki Fridrich
- Write a code that writes code (opens new window) talk by Riki Fridrich. Sep 22, 2021. WebExpo
- fczbkk/talk-2021-09-22-webexpo-codemod (opens new window) GitHub Repo
# ast-types and recast
- recast (opens new window)
- ast-types examples in crguezl/hello-ast-types (opens new window)
- api documentation for ast-types (v0.9.11) (opens new window) (Don't trust it. Current version is 0.15)
# Estraverse
- Estraverse README.md (opens new window)
- Simple examples of AST traversal and transformation crguezl/ast-traversal (opens new window)
- Section Traversing the AST of the Phases of a Translator chapter in this book
# Repositorios interesantes de cowchimp
- A curated list of awesome AST resources
- AST Scout is a tool for analyzing and visualizing the relationship between the public API of a Class\Module and its implementations details (e.g. private methods, dependencies used).
- A web tool to explore the ASTs generated by various parsers. https://astexplorer.net/ The repo
# AST: Awesome Super Tool - JS Roundabout - April 2019
This is a talk similar to Yonatan Mevorach by Leonardo Crespo given in 2019:
- AST: Awesome Super Tool - JS Roundabout - April 2019 (opens new window) by Leonardo Crespo