Overview
The U.S. Web Design System documentation is a repository that includes code and documentation for the U.S. Web Design System website. It utilizes Jekyll for the file framework, gulp for task management, and the node module for USWDS. This documentation provides information on the USWDS components and codebase.
Features
- Code and documentation for U.S. Web Design System website
- Utilizes Jekyll for file framework
- Uses gulp for task management
- Includes node module for USWDS
Installation
Before you start, make sure you have the following installed on your machine:
- Ruby v3.1.2 (see .ruby-version or .tool-versions)
- Node v20.9.0 (see .nvmrc or .tool-versions)
- Bundler v2.2.0 (see .bundler-version)
- Chrome v59 or higher (v60 if on Windows)
- Python v2.7* (For node-gyp dependency)
To install the U.S. Web Design System documentation, follow these steps:
- Clone the latest version of the repository.
- Install project dependencies by running the following command:
npm install
- Run your local server by executing the following command:
npm start
- Open your browser and go to
127.0.0.1:4000
to view the local instance of designsystem.digital.gov.
Additional utility commands:
npm run clean
: Cleans out copied-over dependency assets.npm run lint
: Runs eslint and sass-lint against JavaScript and Sass files.npm test
: Runs all tests and linters.npm run watch
: Monitors changes in both USWDS node module and the root level asset folders in this repo.npm start -- --incremental
ornpm run serve
: Runs your local server with incremental regeneration enabled for faster build time.
Using the latest version of the uswds
package:
- Clone the latest version of the
uswds
repository. - Install the required dependencies by running
npm install
in theuswds
directory. - Build the USWDS package by running
npm run build
in theuswds
directory. - On your local machine, go to the root level of the
uswds
directory and runnpm link
. - In the root level of the
uswds
directory, runnpm link uswds
.
Summary
The U.S. Web Design System documentation provides code and documentation for building websites using the U.S. Web Design System. It requires the installation of Ruby, Node, and other dependencies. Once installed, users can run a local server to view a local instance of designsystem.digital.gov. Additionally, there are utility commands available for cleaning, linting, testing, and watching for changes. The documentation also provides instructions for using the latest version of the uswds
package.