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

@doncrislip/v-ast

v0.2.0-alpha

Published

V•AST: Visualizing the Abstract Syntax Tree of your code galaxy

Downloads

4

Readme

V•AST

V•AST: Visualizing the Abstract Syntax Tree of your code galaxy

Getting Started

Install the V•AST cli package globally.

npm i -g @doncrislip/v-ast

Next, you will need to initialize your V•AST application. Go to whichever directory you would like to run it in - it doesn't matter where :)

cd desktop/some-dir

Then run:

v-ast init

This will create a new project directory with the following files:

v-ast/
    - favicon.ico
    - index.html
    - index.js
    - package.json
    - server.js
    - v-ast.config.js

Change into this directory:

cd v-ast

Now, in your favorite text editor, open the v-ast.config.js. This is where you will define the entry points to all of the projects you would like to visualize. The config file will look something like this:

export default {
    hasEntireCodeGalaxyOption: true,
    entryPoints: [
        // {
        //     name: 'App Name',
        //     path: '/absolute-path-to-entry-point',
        //     aliases: {
        //         'some-alias': '/absolute-path-for-alias'
        //     }
        // }
    ]
}

If you use aliases in your bundling, you will want to include them in this config file. Otherwise, keep the aliases as an empty object.

aliases: {}

The hasEntireCodeGalaxyOption is set to true by default, but if you have a lot of entry points with a lot of code, you may want to switch this to false for performance reasons.

Once you have your entry points set up, you need to build the files V•AST will use:

v-ast build

A json file will be created for each entry point inside the v-ast dir. These json files will have the name of the entry point along with .v-ast.json appended to it. This command will also create a master entry point file. See the example below:

v-ast/
    ...
    - entrypoints.v-ast.js
    - someProjectEntryPoint.v-ast.json
    - anotherProjectEntryPoint.v-ast.json

Now that is all left to do is run the project:

v-ast run

This will initialize a server on port :8080

http://localhost:8080/

Have fun!