All Projects → sverweij → Dependency Cruiser

sverweij / Dependency Cruiser

Licence: mit
Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
HTML
75241 projects
Handlebars
879 projects
Vue
7211 projects
coffeescript
4710 projects

Projects that are alternatives of or similar to Dependency Cruiser

indent.js
Pure code indentation for jsx, tsx, ts, js, html, css, less, scss.
Stars: ✭ 55 (-97.64%)
Mutual labels:  jsx, tsx
harshhhdev.github.io
Harsh Singh's personal blog and portfolio ⚡ built with Next.js
Stars: ✭ 23 (-99.01%)
Mutual labels:  jsx, tsx
njsx
A customizable and declarative interface for creating React and React Native components without JSX syntax.
Stars: ✭ 29 (-98.75%)
Mutual labels:  jsx, tsx
asset-graph-webpack-plugin
Webpack plugin to easily get assets dependency graph based on entry point
Stars: ✭ 13 (-99.44%)
Mutual labels:  dependency-analysis, dependency-graph
emerge
emerge is a source code analysis tool and dependency visualizer that can be used to gather insights about source code structure, metrics, dependencies and complexity of software projects. After scanning the source code of a project it provides you an interactive web interface to explore and analyze your project by using graph structures.
Stars: ✭ 120 (-94.84%)
Mutual labels:  dependency-graph, dependencies
merge-confidence
The home of WhiteSource's Merge Confidence feature, for Renovate and WhiteSource Remediate
Stars: ✭ 41 (-98.24%)
Mutual labels:  dependency-analysis, dependencies
alphasql
AlphaSQL provides Integrated Type and Schema Check and Parallelization for SQL file set mainly for BigQuery
Stars: ✭ 35 (-98.5%)
Mutual labels:  dependency-analysis, dependency-graph
vite-vue-admin
🎉🎉使用Vite + Vue3 + TypeScript + Element-plus + Mock开发的后台管理系统🎉🎉
Stars: ✭ 97 (-95.83%)
Mutual labels:  jsx, tsx
lowcode
React Lowcode - prototype, develop and maintain internal apps easier
Stars: ✭ 32 (-98.62%)
Mutual labels:  jsx, tsx
vscode-ecsstractor
Extracting selectors from HTML / JSX / TSX and generate CSS file.
Stars: ✭ 45 (-98.07%)
Mutual labels:  jsx, tsx
core
Light weight feature rich UI Framework for JavaScript for Browser with Dependency Injection, Mocking and Unit Testing
Stars: ✭ 18 (-99.23%)
Mutual labels:  jsx, tsx
Esbuild
An extremely fast JavaScript and CSS bundler and minifier
Stars: ✭ 29,374 (+1162.85%)
Mutual labels:  jsx, tsx
react
Basic Primitives Diagrams for React. Data visualization components library that implements organizational chart and multi-parent dependency diagrams.
Stars: ✭ 15 (-99.36%)
Mutual labels:  dependency-analysis, dependency-graph
typesafe-templates
Template engine that leverages JSX to generate JavaScript code from TypeScript code files rather than text templates.
Stars: ✭ 27 (-98.84%)
Mutual labels:  jsx, tsx
govizz
No description or website provided.
Stars: ✭ 19 (-99.18%)
Mutual labels:  dependency-graph, dependencies
git-explode
Explode linear sequence of git commits into topic branches
Stars: ✭ 43 (-98.15%)
Mutual labels:  dependency-analysis, dependency-graph
deps-infer
Infer mvn deps from sources
Stars: ✭ 36 (-98.45%)
Mutual labels:  static-analysis, dependencies
javascript
Basic Primitives Diagrams for JavaScript - data visualization components library that implements organizational chart and multi-parent dependency diagrams, contains implementations of JavaScript Controls and PDF rendering plugins.
Stars: ✭ 46 (-98.02%)
Mutual labels:  dependency-analysis, dependency-graph
vue-typescript-tsx
🤓vue typeScript jsx 工程示例
Stars: ✭ 32 (-98.62%)
Mutual labels:  jsx, tsx
Ort
A suite of tools to assist with reviewing Open Source Software dependencies.
Stars: ✭ 446 (-80.83%)
Mutual labels:  dependencies, dependency-graph

Dependency cruiser Dependency cruiser

Validate and visualise dependencies. With your rules. JavaScript. TypeScript. CoffeeScript. ES6, CommonJS, AMD.

What's this do?

Snazzy dot output to whet your appetite

This runs through the dependencies in any JavaScript, TypeScript, LiveScript or CoffeeScript project and ...

  • ... validates them against (your own) rules
  • ... reports violated rules
    • in text (for your builds)
    • in graphics (for your eyeballs)

As a side effect it can generate cool dependency graphs you can stick on the wall to impress your grandma.

How do I use it?

Install it

  • npm install --save-dev dependency-cruiser to use it as a validator in your project (recommended) or...
  • npm install --global dependency-cruiser if you just want to inspect multiple projects.

Show stuff to your grandma

To create a graph of the dependencies in your src folder, you'd run dependency cruiser with output type dot and run GraphViz dot on the result. In a one liner:

depcruise --include-only "^src" --output-type dot src | dot -T svg > dependencygraph.svg
  • You can read more about what you can do with --include-only and other command line options in the command line interface documentation.
  • Real world samples contains dependency cruises of some of the most used projects on npm.

Validate things

Declare some rules

The easy way to get you started:

depcruise --init

This will ask you some questions and create a .dependency-cruiser.js with some rules that make sense in most projects (detecting circular dependencies, dependencies missing in package.json, orphans, production code relying on dev- or optionalDependencies, ...).

Start adding your rules by tweaking that file.

Sample rule:

{
  "forbidden": [
    {
      "name": "not-to-test",
      "comment": "don't allow dependencies from outside the test folder to test",
      "severity": "error",
      "from": { "pathNot": "^test" },
      "to": { "path": "^test" }
    }
  ]
}

Report them

depcruise --config .dependency-cruiser.js src

This will validate against your rules and shows any violations in an eslint-like format:

sample err output

There's more ways to report validations; in a graph (like the one on top of this readme) or in a table.

  • Read more about the err, dot, csv and html reporters in the command line interface documentation.
  • dependency-cruiser uses itself to check on itself in its own build process; see the depcruise script in the package.json

I want to know more!

You've come to the right place :-) :

License

MIT

Thanks

  • Marijn Haverbeke and other people who collaborated on acorn - the excellent JavaScript parser dependency-cruiser uses to infer dependencies.
  • Katerina Limpitsouni of unDraw for the ollie in dependency-cruiser's social media image.
  • All members of the open source community who have been kind enough to raise issues, ask questions and make pull requests to get dependency-cruiser to be a better tool.

Build status

GitHub Workflow Status coverage Maintainability Test Coverage total downloads on npm

Made with 🤘 in Holland.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].