@ukhomeoffice/cop-react-components
v5.1.1
Published
[](https://github.com/UKHomeOffice/cop-react-design-system/actions/workflows/build-and-test.yml) [. Otherwise, install node version specified in .nvmrc.
This library uses the yarn package manager. To install this you will need to run npm install --global yarn on the supported version of node.
Available Scripts
In the project directory, you can run:
yarn install
Installs the package.json dependencies.
yarn storybook
Runs the app in the development mode.
Open http://localhost:6006 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
yarn test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
You can also use yarn test:coverage to see the % code coverage for the repo.
yarn compile
Builds the components for production to the dist folder.
It correctly bundles React components in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your components are ready to be deployed!
See the section about compile for more information.
yarn build-storybook
Builds the storybook files ending in .stories.mdx to static HTML, CSS & JS files located in storybook-static folder.
yarn yalc-publish
This will compile the code with source maps enabled and publish it to the local yalc repository in ~/.yalc Any linked repositories will be automatically updated.
Learn More
You can learn more in the Introduction to Storybook for React.
To learn React, check out the React documentation.
Advanced Babel Configuration
This section has moved here: https://babeljs.io/docs/en/usage/#configuration
Using the Service
Versioning
For versioning this project uses SemVer.
Deploying Storybook
Storybook changes will be deployed automatically on merge to main, see deploy-storybook.yml or can alternatively be triggered manually via github actions ui for branch deployments.
The ui is available here.
Authors
This project is authored by the Home Office.
License
This project is licensed under the MIT license. For details please see License.
This project contains public sector information licensed under the Open Government Licence v3.0. (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
