npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

typescript-ast-explorer

v0.0.5

Published

Command line tool to explore TypeScript projects and SourceFile abstract syntax tree interactively

Downloads

7

Readme

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
  • [x] 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)
  • [x] filter nodes by kind or name or query
  • [x] apply refactors interactively
  • [ ] tree expand all - collapse all
  • [x] move the tree to its own file
  • [ ] stateful modal, selections, expansions, etc
  • [ ] show errors except in modals
  • [x] navigate with arrows 2-d instead of tab only (1-d)
  • [x] a general option/menu to hide boxes - or perhaps a halo on them to collapse ?
  • [ ] confirmation before exit
  • [x] 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