This repository contains demo code and examples for the Branching Out: Design Systems training, focused on frontend development workflows for design systems.
What's included:
Storybook: UI component development and documentation, includes TwigJS for easier templating and integration into Drupal projects.
Starlight (AstroJS): Documentation site powered by AstroJS.
- Node.js (v22+ recommended)
- npm (v10+ recommended)
Clone the repository and install dependencies for each package:
-
Clone the repo
git clone https://github.com/Bixal/drupal-govcon-2025-demo.git cd drupal-govcon-2025-demo -
Install dependencies
npm install
-
That's it! Both project dependencies are installed.
You can run individual workspace commands from root:
# Runs the build command for the component library.
npm run build:vite --workspace storybookYou can also run the short version of the command:
# Runs the build command for the component library.
npm run build:vite -w storybookRun Storybook to see and develop components:
npm run libStorybook will start on http://localhost:6060.
USWDS assets can be imported with @uswds/uswds package entrypoints.
You can see the available entrypoints in the exports field in node_modules/@uswds/uswds/package.json.
Any path you want to import will be prefixed with @uswds/uswds. For example, if you need specific component JS and initialize manually, you'd do that like so:
// your-component.js
import UsaBanner from "@uswds/uswds/js/usa-banner"; // You'll need to manually initialize it.
import InfoIcon from "@uswds/uswds/img/usa-icons/info_outline.svg";Run the documentation site locally:
npm run docsThe docs site will be available at http://localhost:7070.
.
├── storybook # Component library
└── starlight # Documentation siteMIT © Bixal

