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

@doctorlogic/react-components

v0.0.1-231

Published

The DoctorLogic react component library.

Downloads

49

Readme

doctorlogic.react-components pipeline status

DoctorLogic's react component library. See the storybook.

Node Version

This project uses .node-version file to indicate the correct node version to use for this project. You can use a tool like NVS (Node Version Switcher) to manage the Node.js version on your machine. NVS is a cross-platform tool for switching between different versions and forks of Node.js.

How to Use NVS

  1. Install NVS by following the instructions on the NVS GitHub page.

  2. Once NVS is installed, you can switch to the Node.js version required for this project by running the following command in your terminal:

    nvs use

npm Scripts

npm run build

Cleans and builds the project into the dist directory.

Sub scripts:

  • build:ts - builds the .tsx? files
  • build:assets - copies the .scss and .svg assets into dist

npm run clean

Deletes the build output.

npm t[est]

Tests the project. Please add more!

We use jest with the ts-jest preset.

npm run storybook

Starts storybook locally.

npm run build-dl-storybook

Builds a static storybook site. See exporting storybook.

Storybook

The master branch is automatically deployed with GitLab Pages.

Versioning

We do all of our versioning using npm version. You should never modify the package.json:version manually.

Version Scheme

Because this project is still a work in progress, all versioning will be done with npm version prerelease. It is preferable to add a message with the -m flag. There is currently no standard template for the message, but consider something like Upgrade to %s <reason for upgrade>. (Note %s leaving %s in message will automatically be replaced with new version number)

After running npm version, be sure to run the git push and git push --tags commands (or simply git push --follow-tags).

Future Version Scheme

This is an initial plan and should be reviewed by the team

The current plan is to follow Semantic Versioning, with a slight caveat. While we will be using major, minor, patch, and prerelease, they will have slightly different meaning.

  • major - Same as SemVer. Will start at 1 and only be incremented if incompatible API changes are made. Would require a major change in the way our components work. A breaking change for a single component will not trigger a major version bump.
  • minor - Incremented at the beginning of each sprint. Will start at 1. While it is tied to the sprint, the actual number will not be related to the sprint number. At the end of each sprint (before the deploy), the new minor version (containing all of the sprint's changes) will be published.
  • patch - Used for bug fixes. If fixes are needed between sprints, a patch version will be published with the fixes for the previous sprint's minor version.
  • prerelease - Used for tickets. As tickets are merged, a new prerelease version will be published to be available in dependent projects.

Publishing


First time User

After getting access to npm pakage you will need to add your user locally - https://docs.npmjs.com/cli/v6/commands/npm-adduser


The project can be published by simply running npm publish. You do not need to build before publishing. The prepublishOnly script will be run to test and build the project before the publish is run.

Make sure to follow the instructions in versioning.

How to deploy changes to npm

  1. make sure you are on the master branch
  2. run git status to make sure your local is in sync
  3. run npm run build && npm test and visit dist folder to ensure scss files are there
  4. run npm version prerelease -m "Upgrade to %s <reason for upgrade>"
  5. run git push --follow-tags
  6. run npm publish