Skip to content

Latest commit

 

History

History
87 lines (56 loc) · 3.04 KB

real-world-samples.md

File metadata and controls

87 lines (56 loc) · 3.04 KB

Real world projects. Dependency cruised.

Some popular projects on npm

Commander

tj/commander.js - For command line parsing - and cooking command line interfaces.

commander

Chalk

chalk/chalk - For coloring strings in the terminal. A typical Sorhus style micro module that uses other micro modules to accomplish its goals.

chalk

Bluebird

petkaantonov/bluebird - promise library

bluebird

Safe-regex

substack/safe-regex - for sanity checking regular expressions against exponential time errors. For everyone who enables users to input regular expressions in.

safe-regex

Resolve

substack/node-resolve - resolves (node) module names to files on disk.

resolve

Yargs

yargs/yargs - Another library to parse command line options/ cook command line interfaces.

yargs

Typescript

It is possible to use dependency-cruiser to infer dependencies of typescript projects.

We got the picture of tslint below by changing to the tslint/src folder and running this:

dependency-cruise -T dot -x node_modules index.ts  | dot -T png > tslint-without-node_modules.png

(Yep, that's all - no separate transpilation steps necessary ...)

tslint

palantir/tslint - linter for typescript.

tslint

CoffeeScript

In the same vein dependency-cruiser directly supports CoffeeScript.

In the src folder of the coffeescript repo run this:

depcruise -x node_modules -T dot . | dot -T png > coffee-script-coffee-without-node_modules.png

coffeescript

jashkenas/coffeescript - the coffeescript transpiler:

coffee-script

(You see one module flagged as unresolvable - this is the parser code that the coffeescript build script generates jison into the folder with transpiled javascript.)

My own projects

dependency cruiser

Dependency cruiser used on itself. node_modules left out to keep it concise.

dependency-cruiser-without-node_modules

state machine cat

sverweij/state-machine-cat - an interpreter for writing nice state diagrams.

state-machine-cat-without-amdefine

mscgen.js

mscgenjs/mscgenjs-core - an interpreter library for turning text (in MscGen or two other DSLs) into sequence charts.

mscgen.js