{"analyzedAt":"2022-07-14T22:42:02.287Z","collected":{"metadata":{"name":"npm2dot","scope":"unscoped","version":"2.0.0","description":"convert npm dependency list to graphviz format","keywords":["graphviz"],"date":"2017-10-31T02:04:22.907Z","author":{"name":"longtian"},"publisher":{"username":"wyvernnot","email":"wyvernnot@gmail.com"},"maintainers":[{"username":"wyvernnot","email":"wyvernnot@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/longtian/npm2dot.git"},"links":{"npm":"https://www.npmjs.com/package/npm2dot","homepage":"https://github.com/longtian/npm2dot#readme","repository":"https://github.com/longtian/npm2dot","bugs":"https://github.com/longtian/npm2dot/issues"},"license":"MIT","devDependencies":{"mocha":"^2.2.5"},"releases":[{"from":"2022-06-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1},{"from":"2022-04-15T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1},{"from":"2022-01-15T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1},{"from":"2021-07-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1},{"from":"2020-07-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1}],"hasTestScript":true,"readme":"# npm2dot\n![NPM](https://david-dm.org/wyvernnot/npm2dot.svg)\n[![Build Status](https://travis-ci.org/wyvernnot/npm2dot.svg?branch=master)](https://travis-ci.org/wyvernnot/npm2dot)\n\nConvert npm dependency list to dot file which can be visualized using graphviz\n\n[![NPM](https://nodei.co/npm/npm2dot.png)](https://nodei.co/npm/npm2dot/)\n\n**Install**\n\n```sh\nnpm install npm2dot -g\n```\n\n**Usage**\n\n1\\. In a `Node.js` package folder, type in console:\n\n```sh\nnpm ls --json | npm2dot\n```\n\n2\\. By default `npm2dot` will write following content to stdout:\n\n```\ndigraph{\n root=\"debug@2.2.0\"\n \"debug@2.2.0\" -> \"N_1\"\n \"N_1\"[label=\"ms@0.7.1\",style=\"filled\",fillcolor=\"0.06666666666666667 1 1\"]\n}\n```\n\n3\\. This output can be piped to `Graphviz` to generate a picture:\n\n```sh\nnpm ls --json | npm2dot | dot -Tpng -o debug.png -Grankdir=LR\n```\n\nPicture `debug.png` is very simple because [`debug`](https://www.npmjs.com/package/debug) has only one dependency:\n\n![debug.png](doc/debug.png)\n\nThat's how `npm2dot` interacts with `npm ls` and `Graphviz`. More complicated use cases are:\n\n## Use Case 1 : Comparison of folder structure installed separately using NPM2 and NPM3\n\nNPM3 is currently in beta, one of the most expected feature is [flatten structure](http://www.infoq.com/news/2015/06/npm) :\n\n> Dependencies will now be installed maximally flat. Insofar as is possible, all of your dependencies,\n> and their dependencies, and THEIR dependencies will be installed in your project's node_modules folder with no nesting. \n> You'll only see modules nested underneath one another when two (or more) modules have conflicting dependencies.\n\nUsing `npm2dot` and `Graphviz` will help you clearly understand this change:\n\n```sh\nnpm ls --json | npm2dot | twopi -Tsvg -o /tmp/twopi.svg -Granksep=4\n```\n\n**Result:**\n\nBefore, the dependencies is install with npm@2.x\n\n![npm2](doc/oneapmfed@npm2.png)\n\nIf we use npm@3.x (`npm install npm@3.x-next -g`) to install dependencies, there are less nodes in the structure\n\n![npm3](doc/oneapmfed@npm3.png)\n\n## Use Case 2 : Comparison of Express Production and Development environment\n\nIn express folder, execute\n\n```sh\nnpm ls --json | npm2dot | dot -Grankdir=LR -Tpng -O\n```\n\n**Result:**\n\nExpress Production Environment\n\n![express#production](doc/express.production.png)\n\nExpress Development Environment\n\n![express#development](doc/express.dev.png)\n\n## About\n\n1\\. `Graphviz` can be downloaded at [http://www.graphviz.org/Download.php](http://www.graphviz.org/Download.php).\n\n2\\. Anyone can fork this repo to provide more interesting use cases.\n\n3\\. Please include a link to original [github repo](https://github.com/longtian/npm2dot), if you want to use any pictures on this page."},"npm":{"downloads":[{"from":"2022-07-13T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":8},{"from":"2022-07-07T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":88},{"from":"2022-06-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":180},{"from":"2022-04-15T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":474},{"from":"2022-01-15T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1038},{"from":"2021-07-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":1512}],"starsCount":6},"github":{"starsCount":59,"forksCount":2,"subscribersCount":2,"issues":{"count":2,"openCount":2,"distribution":{"3600":0,"10800":0,"32400":0,"97200":0,"291600":0,"874800":0,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":2},"isDisabled":false},"contributors":[{"username":"longtian","commitsCount":16}],"commits":[{"from":"2022-07-07T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":0},{"from":"2022-06-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":0},{"from":"2022-04-15T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":0},{"from":"2022-01-15T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":0},{"from":"2021-07-14T00:00:00.000Z","to":"2022-07-14T00:00:00.000Z","count":0}],"statuses":[{"context":"continuous-integration/travis-ci/push","state":"success"}]},"source":{"files":{"readmeSize":2697,"testsSize":1109,"hasNpmIgnore":true,"hasChangelog":true},"badges":[{"urls":{"original":"https://david-dm.org/wyvernnot/npm2dot.svg","service":"https://david-dm.org/wyvernnot/npm2dot.svg","shields":"https://img.shields.io/david/wyvernnot/npm2dot.svg","content":"https://img.shields.io/david/wyvernnot/npm2dot.json"},"info":{"service":"david","type":"dependencies","modifiers":{"statusType":"normal"}}},{"urls":{"original":"https://travis-ci.org/wyvernnot/npm2dot.svg?branch=master","service":"https://api.travis-ci.org/wyvernnot/npm2dot.svg?branch=master","shields":"https://img.shields.io/travis/wyvernnot/npm2dot/master.svg","content":"https://img.shields.io/travis/wyvernnot/npm2dot/master.json"},"info":{"service":"travis","type":"build","modifiers":{"branch":"master"}}},{"urls":{"original":"https://nodei.co/npm/npm2dot.png","shields":"https://img.shields.io/npm/v/npm2dot.svg","content":"https://img.shields.io/npm/v/npm2dot.json"},"info":{"service":"npm","type":"version"}}],"linters":["editorconfig"]}},"evaluation":{"quality":{"carefulness":0.9999999999999999,"tests":0.85,"health":1,"branding":0.44999999999999996},"popularity":{"communityInterest":70,"downloadsCount":158,"downloadsAcceleration":0.870433789954338,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":0.9,"issuesDistribution":0.9}},"score":{"final":0.6735775353054716,"detail":{"quality":0.9789416107200618,"popularity":0.085533600583626,"maintenance":0.9998808339576686}}}