Socket
Book a DemoInstallSign in
Socket

dependrix-visualisation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependrix-visualisation

Visual and compare dependencies across multiple projects

1.1.1
latest
npmnpm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

dependrix-visualisation

Visualise and compare library usage across multiple projects

Setup your own dependrix visualisation

Dependrix visualises cross-project dependencies using a model as described by schema.json. You can generate a model yourself, or make use of the following:

Build a standalone HTML file

Use the buildStandaloneHTML function exposed by dependrix-visualisation to generate a single HTML file

const fs = require('fs')
const { buildStandaloneHTML } = require('.')

const writeFile = (filename, content) => new Promise((resolve, reject) => fs.writeFile(
  filename,
  content,
  'utf8',
  (err, data) => err ? reject(err) : resolve(content)
))

const model = { projects: {}, analysis: { title: 'An example analysis' } }
buildStandaloneHTML(model)
  .then(html => writeFile('./dependrix-example.html', html))
  .catch(console.error)

Supply your own modelled-dependencies.json

Use the HTML files included in dependrix-visualisation and place them alongside a JSON file containing your model in a location where your webserver can serve them:

mkdir webserver
npm install dependrix-visualisation --save-dev
cp node_modules/dependrix-visualisation/dist/index.html webserver/
cp node_modules/dependrix-visualisation/dist/bundle.min.js webserver/
cp yourDependrixModel.json webserver/modelled-dependencies.json

Local development

Build

npm run build
# or
npm run build -- --watch #automatically re-build whenever changes are made

Run

Open dist/index.html in your browser

Tests

npm test

Tests are run with Jest

Linting

npm run lint

Linting is done with ESLint and is configured to conform code to https://standardjs.com/

FAQs

Package last updated on 20 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.