@rootstrap/rs-components-library
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

RS Components Library

React components library based on the Design System for RS internal projects

Contributing

Local environment setup

First Start

  1. Clone the repo
  2. If you use NVM, run nvm use in project's root directory to use expected node version
  3. Run yarn install in project's root directory
  4. To start the project, run yarn dev. That will start Storybook with hot reload, ready for development

Consuming package locally

Although we use storybook as sandbox and development environment for components, sometimes you want to also test how your changes work from the project consuming the library. The best way to do that is make your consumer project use your local version of the library.

To do this, it depends on the package manager you're using in the consumer project, here's the docs for most common scenarios:

TIP: while using your locally linked version, you can test live component changes by running yarn dev:lib:watch on the library project.

Troubleshooting

Build fails:
  • Make sure you are using expected node version by running nvm use in project root directory
  • Run yarn clean && yarn to perform a clean install

Package management on NPM

Any updates you do on this repo won't be effective until a new package version is published to NPM. To publish new version you need to:

1. Get access to Rootstrap organization:

  1. Create an account on NPM
  2. Provide your account email to any web leader from Rootstrap so they can add you to the organization. (Or just ask for NPM access on the #react slack channel)

2. Login to npm cli:

Run npm login on your terminal and follow the required steps

3. Bump package version:

In order to let NPM know that this is a new version we need to update the "version" key on the package.json file. To do that in a clean way we follow this process:

  1. Go the project directory and run git checkout main && git pull
  2. Run npm version <update_type>, replacing <update_type> with one of the semantic versioning release types (patch, major, or minor). This will update package.json and create a new commit.
  3. Run git push so everyone get this change.

4. Publish to NPM:

Finally, run npm publish --access public.


NOTE: This publishing process will later be automated by a github action, so things like git releases will be added there.

Readme

Keywords

none

Package Sidebar

Install

npm i @rootstrap/rs-components-library

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

2.61 MB

Total Files

23

Last publish

Collaborators

  • rootstrap-developers
  • manueljuarez
  • nmachado
  • fsarachu-dev
  • felipegarcia92
  • aguschaer
  • dpresa
  • spereztoledo