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

@tidepool/viz

v1.43.0

Published

Tidepool data visualization for diabetes device data.

Downloads

3,334

Readme

Build Status

@tidepool/viz

Tidepool data visualization for diabetes device data.

This README is focused on just the nuts & bolts of getting the code in this repository ready to develop locally in blip or with React Storybook. For more detailed information about the code in this repository, please see the developer guide.

Table of contents


Getting started

After cloning this repository to your local machine, first make sure that you have at least node 6.x and npm 4.x installed. If you have a different major version of node installed, consider using nvm to manage and switch between multiple node (& npm) installations. If you have npm 3.x installed (as it is by default with node 6.x), then you can update to the latest npm 4.x with npm install -g npm@4.

It's not an absolute requirement, but it is preferable to have Yarn installed, as it provides dependency management features above and beyond what npm provides. Just follow Yarn's installation instructions (hint: for Mac users with Homebrew installed, it's just brew install yarn).

Once your environment is setup with node 6.x and npm 3.x install the dependencies with Yarn:

$ yarn install

Or with npm if you're choosing not to use Yarn:

$ npm install

Development

Running locally with blip

To work on code in this repository within blip, first do the following from your local blip repository (assuming blip/ and viz/ are sister directories):

$ npm link ../viz/

In this repository, start the build in watch mode:

$ npm start

Finally, back in your local blip repository, follow the instructions for starting blip locally.

Running locally in React Storybook

If you're working at the component or view level outside of blip, you can work on component and view rendering code with React Storybook.

If you're working on the diabetes data model rendering components, run:

$ npm run typestories

If you're working on any other components or views, run:

$ npm run stories

For more about the use of React Storybook in this repo, see use of React Storybook.

Running the tests

To run the unit tests in PhantomJS (as they run on Travis CI):

$ npm test

To have the tests run continuously with source and test code changes rebundled as you work:

$ npm run test-watch

To run the unit tests in your local Chrome browser (recommended for Tidepool developers before merging or publishing a release):

$ npm run browser-tests

Running the linter

To run the code linter from the command line:

$ npm run lint

Generally speaking, Tidepool developers configure linting to run continuously in their text editor of choice, and we recommend this approach for development. You can easily find instructions online for running ESLint continuously in all of the popular text editors—SublimeText, Atom, Visual Studio Code, etc.

Production

Publishing examples to GitHub Pages with React Storybook

See the publishing section of the docs on docs.

Building and publishing to npm

When a new feature(s) is/are complete (i.e., branch is synchronized with master, reviewed with a sign-off from another developer), it's time to publish the package to npm! Since this is one of our most recently created repositories, any member of the "developers" team in the @tidepool npm organization will be able to publish the package using his or her npm login. Steps to publishing are as follows:

  1. create a tag on the approved pull request using the mversion tool with the -m option to auto-commit the version bump and tag (e.g., $ mversion patch -m for a patch version bump)
  2. push the new commit and tag to the GitHub remote with $ git push origin <branch-name> and $ git push origin --tags
  3. check that the tag build has passed on TravisCI
  4. $ npm whoami to check if you are logged in as yourself; if you are, skip to 7.
  5. if you are logged in as tidepool-robot, log out with $ npm logout
  6. then log in as yourself with $ npm login
  7. publish the new version with $ npm publish; before the actual publish happens, the yarn install, linter, tests, and packaging webpack build will run since we have set those up through the prepare and prepublishOnly npm hooks in the package.json
  8. merge the approved pull request to master
  9. remember to bump the version appropriately in the package.json for the app (e.g., blip) requiring @tidepool/viz as a dependency!