ast-builder
ast-builder copied to clipboard
Build your ASTs directly from code
ast-builder
WARNING: This repository is moved here https://github.com/rajasegar/ast-tooling/tree/master/apps/ast-builder
Build your Abstract Syntax Trees (AST) directly by writing code. Simply type in your code and get the right jscodeshift api to build your AST.
Read the introductory blog post to know more about the tool.
This application is built in Ember.js
How to use it?
- TOP LEFT PANE => Source code
- TOP RIGHT PANE => AST
- BOTTOM LEFT PANE => Builder API
- BOTTOM RIGHT PANE => Verified Output (Source code)

Motivation
The reason this project is created is because, I am simply frustrated for looking up reference for writing codemods and the jscodeshift api is not very well documented.
This is an interactive version of jscodeshift-docs
Prerequisites
You will need the following things properly installed on your computer.
- Git
- Node.js (with npm)
- Ember CLI
- Google Chrome
Installation
git clone <repository-url>this repositorycd ast-buildernpm install
Running / Development
ember serve- Visit your app at http://localhost:4200.
- Visit your tests at http://localhost:4200/tests.
Code Generators
Make use of the many generators for code, try ember help generate for more details
Running Tests
ember testember test --server
Linting
yarn lintyarn lint:fix
Building
ember build(development)ember build --environment production(production)
Deploying
Specify what it takes to deploy your app.