Skip to content

Publishing design system components to npm CDN

zakiya edited this page Aug 20, 2024 · 2 revisions

Authentication (one-time only)

  1. Make sure you have npm credentials and local machine authentication.
  2. Make sure you have AWS CLI credentials and local machine authentication.

MAJOR Change Pre-flight Check

  1. Regression tests component in drought, cannabis, and/or covid19 as needed
  2. Document upgrade path
  3. Include broadband and other sites we know are using the code
  4. Draft communications (if necessary)

All Change Pre-flight Check

  1. Review README
  2. Review name and version number in package.json
  3. Review and fix all security vulnerabilities
  4. Test all scripts
    1. build
    2. html:preview
    3. test
  5. Update CHANGELOG

Publish

Go to the package in question

cd design-system/components/[package]
npm publish --access public

Note that on npm publish, the prePublishOnly### hook fires. Details

Versioning

semver.org | MAJOR.MINOR.PATCH

MAJOR

  • Change that breaks markup
  • Change that moves assets
  • Change in approach
  • Major changes in components
  • Consider:
    • Variable name changes

MINOR

  • Non-breaking changes (style)
  • minor changes in all components

PATCH

  • Hotfixes - A change made to the game deemed critical enough that it cannot be held off until a regular release.

References

design-system/README.md at main · cagov/design-system

Clone this wiki locally