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

cpal-components

v1.4.3

Published

cpal-components React component

Downloads

7

Readme

CPAL Components

Getting Started

Run npm install to install required dependencies, then run one of the following:

  • npm run start: this starts the explorer and serves the explorer component from /src/modules/cpal/explorer
  • npm run styleguide: this starts the style guide which shows all components available in this repository, along with documentation and examples.

Using components from this library

To use components from this library, first add the repo using npm:

npm install git+ssh://[email protected]:Hyperobjekt/cpal-components.git

You can then import any components into your project.

import { Header } from 'cpal-components'

function AppHeader() {
  return (
    <div className="page">
      <Header />
      <div className="body">Sample page</div>
    </div>
  )
}

Publishing changes

This library can be published via NPM.

  1. Increment the package version in package.json.
  2. Commit that change: git add * ; git commit -a -m 'Update package version to [version]'.
  3. Run npm publish. This builds two versions of the javascript library and the demo files. The libraries are pushed up to NPM's repository.
  4. Commit the publish (so you don't dirty up your next working branch). git add * && git commit -a -m 'Staging build'.
  5. Update the plugin in the site where you're using it: git checkout -b update-explorer ; npm update cpal-components.
  6. Commit that update, merge to master, and push. git add * ; git commit -a -m 'Update cpal-components' ; git checkout master ; git merge update-explorer ; git push origin master

Updating schools data

The client supplies a CSV to us with all the schools data, and this data changes frequently. These are the steps required to switch out this data.

  1. Download the CSV from the shared client folder.
  2. Convert it from CSV to JSON. Select the minify option. Download the converted JSON file.
  3. Rename the file to schools.js. Drop this into ./src/data, replacing the existing schools.js file.
  4. Open the file and add the following to the beginning of the file, before the opening bracket of the JSON:
// prettier-ignore
export const schools = 

This prevents your text editor from shutting down when prettier tries to process the whole GD file. 5. The file should now look something like this:

// prettier-ignore
export const schools = [{"OBJECTID":1,"TEA":47,"SLN":47,"SCHOOLNAME":"Franklin International Exploratory Academy Middle School","LEVEL":"Middle","ADDRESS":"6920 Meadow Rd.","CITY":"Dallas","ZIP":75230,"PHONE":9725027100,"WEBSITE":"http://www.dallasisd.org/franklin","POINT_X":....
  1. Save the file. Git commit. Publish a new version of the component library (see above).