@timenglart/cbr v1.0.0
JCU CookBook React Library
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 distThe 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 startThis 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:visualizeTo interactively explore components and their relevant props, run:
yarn storybookThis 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 testYou can also check code coverage using:
yarn test --coverageUpgrading
To upgrade
react-scripts(Create React App, follow the instructions in the updating documentation.To upgrade this package's dependencies:
yarn upgrade-interactiveand read through each of the package's changes to ensure nothing will break on upgrade.
To upgrade
@jcu/cookbook, complete theyarnupgrade 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 lint4 years ago