@doctorlogic/react-components
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-227 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @doctorlogic/react-components

Weekly Downloads

2

Version

0.0.1-227

License

ISC

Unpacked Size

4.7 MB

Total Files

1718

Last publish

Collaborators

  • pstevensatdl
  • doctorlogicnpm
  • rdennis_dl
  • mellisonatdl
  • klumanlan