@raspberrypifoundation/design-system-core
v2.7.0
Published
Markup and styles for the **Raspberry Pi Foundation Design System**
Keywords
Readme
RPF Design System - Core
Markup and styles for the Raspberry Pi Foundation Design System
Design System links:
Usage
npm install --save @raspberrypifoundation/design-system-coreDevelopment
Dependencies:
- asdf (https://asdf-vm.com/)
asdf installInstall packages:
npm iRun Storybook:
npm run storybookTesting
Run the tests with npm run test.
If you get an error about Playwright not being installed, you can install it with npx playwright install.
Building
You can build a version of the compiled CSS by running npm run build.
Development and production builds
The CSS is built as part of the CD process, deploying to https://static.raspberrypi.org/styles/design-system-core/branches/**insert branch name here**/design-system-core.css. For example, the main branch will get built at
- https://static.raspberrypi.org/styles/design-system-core/branches/main/design-system-core.css
And tagged releases will get built to versioned URLs of the following form, allowing downstream projects to track individual releases of the design system.
https://static.raspberrypi.org/styles/design-system-core/releases/vx.y.z/design-system-core.css
Releasing a version
- Open the Prep release workflow, select Run workflow, and choose a
patch,minor, ormajorversion bump. - The workflow creates a branch and opens a draft pull request that:
- bumps the version in
package.jsonandpackage-lock.json; and - changes the
Unreleasedheading inCHANGELOG.mdto the new version.
- bumps the version in
- Review the generated changes, mark the pull request ready for review, and merge it into
main. - Create a matching tag. The tag must start with
v, for examplev2.5.0. You can do this in either of these ways:
Using the command line: pull the merged commit, then create and push the tag:
git checkout main git pull git tag v2.5.0 git push origin v2.5.0Using the GitHub UI:
- Open the new release page.
- Select Choose a tag and enter the new version, including the
vprefix. - Select Create new tag on publish.
- Confirm that the tag will target the
mainbranch.
- On the new release page, select the matching tag, generate the default release notes, and publish the release. If you chose to create the tag through the GitHub UI, publishing the release creates the tag at the same time.
Publishing the GitHub release triggers GitHub Actions to publish the npm package using npm Trusted Publishing and deploy the compiled CSS to https://static.raspberrypi.org/styles/design-system-core/releases/**tag**/design-system-core.css. Releases do not require an NPM_TOKEN or NODE_AUTH_TOKEN repository secret.
