@timenglart/cbr
v1.0.0
Published
React component library based on the styling of @jcu/cookbook
Downloads
1
Readme
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 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 theyarn
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