0.0.5 • Published 5 years ago

typescript-ast-explorer v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

typescript-ast-explorer

Contents

Summary

  • Demo screen casts
  • Explore a local TypeScript project with an Command Line interactive tool.
  • Navigate through the AST nodes and source code at same time
  • See it file structure and the AST nodes inside each file.
  • JavaScript / TypeScript API for GUI component to select files/folders/nodes interactively (based on blessed/accursed/ts-morph)

Install

npm install -g typescript-ast-explorer

Usage

cd my/typescript/project
typescript-ast-explorer

Options

No options - WIP - it's mostly an interactive tool

TODO

  • --tsConfigPath - to load a ts project other then current folder's
  • use accursed and remove a lots of files.
  • API to reuse as AST node selector - project file / folder selector
  • query elements across the project using CSS-like language (tsquery)
  • filter nodes by kind or name or query
  • apply refactors interactively
  • tree expand all - collapse all
  • move the tree to its own file
  • stateful modal, selections, expansions, etc
  • show errors except in modals
  • navigate with arrows 2-d instead of tab only (1-d)
  • a general option/menu to hide boxes - or perhaps a halo on them to collapse ?
  • confirmation before exit
  • move blessed reusable utilities to their own package

  • in file view - remove details parent and leave the children only.
  • should we add the code view in the file view?
  • currently, because of custom .d.ts, the project needs to declare the types in its own ts.config.json
  • file view: expand first folder automatically.
  • when switching from files view to code view it should open in last viewed node and vice versa - auto-expanding the tree