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

@joaoreynolds/civic-review-common

v0.0.2

Published

Common modules or components used in the Civic Review ecosystem

Downloads

1

Readme

civic-review-common

Common components and modules used in Civic Review projects

Installation

Install with npm/yarn:

npm install @joaoreynolds/civic-review-common --save

Where the version can be anything (see package.json for current version)

import {LiveMap} from 'rs-common'

Also, you need to import rs-common.css only once in your project (doing this at the root somewhere will enable you to override classes when needed):

import 'rs-common/dist/rs-common.css'

Or with Sass:

@import "~rs-common/dist/rs-common.css";

Usage

Live Map

import {LiveMap} from 'rs-common'

For all accepted properties and their shapes see propTypes in /index.js

<LiveMap
  googleMapApiKey={googleApiKey}
  center={{latitude: mapSettings.Latitude, longitude: mapSettings.Longitude}}
  zoom={mapSettings.ZoomLevel}
  routes={visibleRoutes}
  stops={this.state.stops}
  landmarks={this.state.landmarks}
  vehicles={this.state.vehicles}
  showStaticVehicleCapacity={true}
  showVehicleInfoBoxOnClick={true}
  onClickVehicle={this.handleClickVehicle}
  vehicleEstimates={this.state.estimateData.vehicleEstimates}
  timezone={timezone}
/>

Developing

If you're going to make changes to the rs-common module you need clone this project somewhere in your file system, run npm install there, then create an npm link to that module. It works similarly to a symlink to create this kind of behavior when npm is getting or referencing the module: admin/node-modules/rs-common -> ../rs-common. This way you can make changes to the rs-common components and it will be updated and instantly used in the parent/consuming app.

(Swap the below commands out for yarn link if you, like I, prefer it)

In the rs-common project root, run: npm link Then in the consuming project root (for ex: Admin Frontend), run: npm link rs-common.

If you need to remove the link, just run npm unlink rs-common.

Making changes while developing

When you need to make changes in rs-common, you'll probably do so while it's linked (see above) to a consuming app. So, you'd have your consuming app watching files, then you need to open this project in parallel (rs-common) and run npm run dev-linked. This way, when you make changes, rs-common will rebuild the dist folder and that change should be automatically reflected in the consuming app. The build process runs the code through a transpiler and prepares it automatically for publishing and use in the production environment too.

#Installing Generally speaking, we use SSH keys to log into BitBucket to install this component. To do this, on your local machine install Git Bash Run Git Bash and follow these instructions. Be aware, this needs to go on your user account. https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html