Giter Site home page Giter Site logo

bbmoz / gochu Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 764 KB

View a graph of your project

Home Page: https://git.io/v9TQs

License: MIT License

JavaScript 98.72% HTML 0.74% CSS 0.54%
modules tree deps dependencies graph chart import export require ast

gochu's Introduction

Gochu

npm build climate deps license

example

View a graph of your project!

Get Started

$ npm install -g gochu

There are two ways to generate a graph:

  1. Screenshot
$ gochu start
$ gochu run -s -t 'example/**/*.js'   # see .gochu/ for screenshots
  1. Live Graph
$ gochu start
$ gochu run -t 'example/**/*.js'  # open http://localhost:8080

*Make sure to start the gochu web server before generating a graph.

CLI

$ gochu start             # start web server at localhost:8080
$ gochu stop              # stop web server
$ gochu run [-s|--screenshot] [-t|--target '<glob>']  # generate graph
$ gochu [-h|--help]       # show all commands
$ gochu run [-h|--help]   # show "run" command info

Features

  • visual graph of project files and their relationships
  • real-time graph each time gochu run -t is executed
  • generate screenshots with -s option
  • support ES6 modules (import and export)

Enjoy!

info

love

gochu's People

Contributors

bbmoz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

gochu's Issues

single-run HTML generation and screenshots

Execute binary to either generate HTML as a single-run or spin up a server that updates localhost:5050 with a new graph upon changes to the specified target files in .gochurc. It may also be worth to look into screenshots instead of generating an HTML file.

#2
#3

start gochu-web automatically when gochu starts

It is too inconvenient to run gochu-web and then open a new tab to run gochu. Simply running gochu should start (if not already started) the gochu web server and then run gochu as usual. There should be a new option to stop the server. For example, gochu stop. It would also be nice to have gochu start to start the server by itself without running gochu.

visual studio code / atom plugin

Plugin:

  • show gochu graph (like preview mode for markdown files) on hotkey combo
  • navigate project by clicking on a node on the graph

support files with flow types

When running gochu on files with flow types, an error occurs regarding an unexpected token :.

For now if you come across this issue, you would have to first strip away the flow types before running gochu. Maybe we can look into flow-parser.

generate HTML file that displays the graph

This includes combining the execution of the client, server, and lib that ends when the HTML file is generated.

The .gochurc #2 should allow the user to specify the directory to generate the HTML file as well as the filename itself. If dir doesn't exist, create it during generation. The default filename could be gochu.html.

Currently, the client relies on a browser window environment to generate the cytoscape graph. Maybe we can use jsdom or something similar and then generate the html from that, so that the gochu tool can run in headless CI. This should be a single binary.

support additional module formats

Atm, only es6 modules (import, export) are supported. It would be great if we supported other module formats.

  • es6 (import, export)
  • commonjs (require)
  • amd (define)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.