1.0.37 • Published 1 year ago

reporting-poc-test v1.0.37

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

CitrusAd React Component Library

🚀 Get Up and Running

Install the dependencies

Once you have cloned the repository:

  1. Open your terminal
  2. Run yarn to install the dependencies

Start Storybook

Once dependencies have been installed:

  1. Start the project by running yarn storybook
  2. Once completed, the shared component library should open automatically. Otherwise navigate to http://localhost:6006/ (if using the default settings)

Add .npmrc file

  1. Create a new file .npmrc in the project root folder
  2. Generate a Personal Access Token (PAT) from Github https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
  3. Add the following to the new .npmrc file:
@citrus-international:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_TOKEN>

🤝 Contributing

Creating a release

Once you have added or edited a component in the library:

  1. Update the version number in package.json. For now this is a manual process, but this will be automated eventually.
  2. Run yarn isready to make sure the project is ready for PR (formatting, linting, tests, etc.)
  3. Create a PR with your changes, and complete the PR process to merge your changes with main.
  4. Create a release via Github https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository Note: Please use the same version number for the tag as the version you updated in package.json, the description should contain any major changes you've made since the last release.

Creating a Package

  1. Once you have created the release, a workflow will automatically be run in the background. This can be viewed via the Actions tab in github (this can also be used for debugging if your new package doesn't appear)
  2. Once the workflow is complete, your new package should appear in Github https://github.com/orgs/citrus-international/packages?repo_name=react-component-library

Using a Package

  1. Copy your .npmrc file from this project to the project you wish to use the component library in.
  2. Install your package via the preferred command shown on Github within your latest release
  3. Import and use your required component

Unit tests

  1. To run unit tests run yarn test
  2. If any tests fail due to a mis-matched snapshot, try running yarn test -u.
1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.33

1 year ago