1.0.2 • Published 3 years ago

@timenglart/cb-r v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

JCU CookBook React Library

Node.js CI code style: prettier

JCU CookBook-React is a React component library featuring common components for University projects, styled using JCU CookBook.

Requirements

  • Node 12.x.x (or above)
  • Yarn

Deployment

Create a distribution by running the following:

yarn
yarn dist

The compiled TypeScript files can be found in the ./dist folder along with their type definition files.

Development

To set up for development, run the following:

yarn
yarn start

This will build a development distribution and watch the project directory's files, automatically recompiling as changes occur to components.

If you'd like to visualise and analyse the resulting component bundle, run:

yarn build:visualize

To interactively explore components and their relevant props, run:

yarn storybook

This will create a Storybook application which will run a server at http://localhost:6006 which you can view, interact and modify the created React components.

Tests

To run tests on the components and their respective code:

yarn test

You can also check code coverage using:

yarn test --coverage

Upgrading

  • To upgrade react-scripts (Create React App, follow the instructions in the updating documentation.

  • To upgrade this package's dependencies:

    yarn upgrade-interactive

    and read through each of the package's changes to ensure nothing will break on upgrade.

  • To upgrade @jcu/cookbook, complete the yarn upgrade procedure above. For updates to major or minor versions, you will also have to modify the CDN URL located in ./src/config.ts.

Prior to committing any such upgrades, run the tests for this package, described above.

Code standards

All code written in this project is linted via eslint and its default configuration with CRA and formatting is carried out automatically on commit via prettier.

Code can be manually checked and linted via:

yarn lint