Giter Club home page Giter Club logo

node-dependencies-view's Introduction

node-dependencies-view

This repository dependency structure:

If you want to use one in your repo's README.md or anywhere else, use a link like these:

The query string arguments are set in the dot string as properties of the graph. You can use most of them. Documentation is at http://www.graphviz.org/Documentation/dotguide.pdf.

Please don't abuse this service. Since the server is a free Glitch instance it will fail if under heavy load or if you try to fetch a super huge project (GitHub caches images, so it is mostly safe to use it in README.md).

The graphs are made with Viz.js.

If you want to browse dependencies (for a lot of languages) better, you should try the Module Linker browser extension.

If you want more unrelated sugar in your GitHub README.md, you should try https://github.com/tj/gh-polls or https://ght.trackingco.de/.

Traffic statistics for this repo:

node-dependencies-view's People

Contributors

fiatjaf avatar machawk1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-dependencies-view's Issues

Branch support

Awesome project!

Any chance you'd consider modifying the project so branches other than master could be specified? Or would you be open to accepting pull-requests that do that?

manage file not found errors

In some repositories, I deliberately exclude files containing some sensitive information (e.g. API keys stored in a params.json file).

node-dependencies-view then fails at generating the svg, producing the following error message:

{ Error: Cannot find module '../params.json'
    at Function.Module._resolveFilename (module.js:469:15)
    at resolveFileName (/tmp/node-dependencies-view/node_modules/resolve-from/index.js:17:39)
    at resolveFrom (/tmp/node-dependencies-view/node_modules/resolve-from/index.js:31:9)
    at module.exports (/tmp/node-dependencies-view/node_modules/resolve-from/index.js:34:41)
    at inspect (/tmp/node-dependencies-view/dependency-tree.js:32:22)
    at module.exports (/tmp/node-dependencies-view/dependency-tree.js:14:24)
    at download.then.then (/tmp/node-dependencies-view/graph.js:16:16) code: 'MODULE_NOT_FOUND' }
TypeError: Cannot read property 'split' of undefined
    at graph.then.dot (/tmp/node-dependencies-view/server.js:27:24)

Two possible solutions are:

  • skip the file not found (and possibly warn about incomplete results in the produced svg)
  • catch the error, and concatenate baseand req, instead on relying on function resolve.

This second solution worked well for me:

try {
	var resolved = resolve(path.dirname(file), req)
} 
catch(e) {
	var resolved = base + req
}
let rel = '.' + resolved.slice(base.length)

Would you consider a pull request for this?

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.