npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

skyeye-connection-map

v2.6.11

Published

## Setup

Downloads

87

Readme

di2-connection-map

Setup

  • yarn install
  • yarn run build

Development

Connection map can be run in standalone mode for development outside of host applications.

In order to have a successful build you first need to have bower installed globally. Then run bower install within the repo to generate the bower_components directory.

Development harness can be found in src/mount.tsx.

  • yarn run watch
  • yarn run dev

Deploy

Connection map is consumed as an npm package via the consuming projects package.json. Connection map must be built and tagged with a version before being pushed to github where it will be available under that version in consuming projects.

Rough deploy step-by-step:

  1. Make changes to connection map and commit.
  2. yarn run build and commit built files.
  3. Tag as new version and push tags - easy way is npm version major|minor|patch > git push origin <BRANCH> --tags.
  4. PR in to master.
  5. In consuming project update version in package.json:

    "di2-connection-map": "git+ssh://[email protected]/financial-times/di2-connection-map.git#v0.3.0", -> "di2-connection-map": "git+ssh://[email protected]/financial-times/di2-connection-map.git#v0.4.0",

Structure

Connection map is a react component that wraps an svg and triggers drawing code using d3.js to create the visualisation.

There are 5 main elements to the code base.

  • Wrapping react components
  • connection-map class that triggers drawing from sub classes and manages zoom and navigation events
  • Several small classes for various visual components of the visualisation that manage thier own drawing
  • Several React SFC's used to render HTML strings for usage in the svg
  • mini-map class for drawing and managing the mini-map navigation aid

Usage

// Pesudocode

import ConnectionMap, { IConnectionCompanyData } from 'di2-connection-map';

const connectionsData: IConnectionCompanyData = /* data from somewhere */
const connectionsId: string = /* entityId of the active company */

ReactDOM.render(
  <ConnectionMap
    connectionsData={connectionsData}
    requestId={connectionsId}
    onNavigate={scoutId => /* navigate fn */ }
    onNavigateToCompanyPage={scoutId => /* navigate fn */ }
  />,
document.body)