Git Product home page Git Product logo

design-system's Introduction

CMS Design System Build Status

The design system is a set of open source design and front-end development resources for creating Section 508 compliant, responsive, and consistent websites. It builds on the U.S. Web Design Standards and extends it to support additional CSS and React components, utility classes, and a grid framework to allow teams to quickly prototype and build accessible, responsive, production-ready websites.

Packages

You're currently at the root of a monorepo which contains multiple NPM packages located in packages directory. View the README.md in each of these for additional details.

Name Description
Core The core CSS and React components for the design system. Includes the Support package.
@cmsgov/design-system-core
Layout A responsive flexbox grid framework.
@cmsgov/design-system-layout
Support Sass variables, mixins, and functions. Included in the Core package.
@cmsgov/design-system-support

Internal packages

These packages are project dependencies, mostly focused around the design system's developer tooling and documentation.

Name Description
Documentation site This directory contains code related to the documentation website. Unless you're a contributor, this directory isn't that interesting to you.
ESLint config The ESLint rules we use to lint the design system's JS and React components
@cmsgov/eslint-config-design-system
Stylelint config The Stylelint rules we use to lint the design system's Sass
@cmsgov/stylelint-config-design-system
Yeoman generator A Yeoman generator used in the development process. Again, unless you're a contributor, this directory isn't that interesting to you.

Examples

Examples of the design system in use can be found in the examples directory.

Contributing

Please read the CONTRIBUTING.md document to learn about contributing to the design system, and our coding guidelines.

Running locally

This project uses Yarn for package management. Yarn helps to ensure everyone is using the same package versions. Install Yarn, if you don't have it yet.

Getting started

  1. yarn install
    • This will also run Lerna bootstrap which allows us to have multiple packages within the same repo (a monorepo). Lerna installs all our dependencies and symlinks any cross-dependencies.
  2. yarn start

Note: When you create a Git commit, any staged scripts will be automatically ran through ESLint and Prettier. If the linter catches an error, your commit will fail. This is a feature, not a bug :)

Scripts

These scripts can all be run from the root level of the repo:

  • yarn start
    • Starts local server running the documentation site
    • Regenerates documentation when files change
  • yarn build
    • Compile/transpile/uglify everything and makes things release-ready.
  • yarn bump
    • Increments package versions. Read "Versioning" for more info.
  • yarn generate
    • Generates the necessary files for a new core component
    • Alias: yarn g
  • yarn test
    • Runs JS unit tests
    • Lints JS using ESLint
    • Lints Sass using stylelint
  • yarn test:watch
    • Runs JS unit tests and will continue to run tests as files change
  • yarn update-snapshots
  • yarn lint
    • Runs just the linting portion of the tests

Theme scripts

You can also use the following scripts to build and preview a theme:

  • yarn start:theme
  • yarn build:theme

These scripts will also place the documentation into a docs subdirectory in your theme's directory.

If you have multiple directories inside of packages/themes, you can specify which theme to use by passing the scripts the name of the folder. For example: yarn start:theme my-theme-folder-name

If your documentation site will be uploaded to a subdirectory (ie. example.com/design-system), you can set its root path by passing the --root option. For example: yarn build:theme --root design-system

Contact

To contact the CMS Design System product owners, please email [email protected]

One of our goals is to ensure a welcoming environment for all contributors. Please take a look at our Code of Conduct to learn more.

design-system's People

Contributors

sawyerh avatar pwolfert avatar line47 avatar 1copenut avatar hannaliebl avatar dependabot[bot] avatar phiden avatar bernardwang avatar amistein avatar sethetter avatar scitech avatar somepedro avatar slapula avatar apobbati avatar andrew565 avatar erinrep avatar kencheeto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.