sparkdesignsystem / spark-design-system

Spark Design System
https://sparkdesignsystem.com
MIT License
106 stars 74 forks source link
design-patterns design-system hacktoberfest spark

Build Status

Spark Design System

Welcome to the Spark Design System, a product of Rocket Mortgage.

Spark Design System is where we collect our best solutions for how to design and build unified digital experiences for the Rocket brands.

Getting Started

Spark assumes your project is using Sass for styling and also that your project has a JavaScript build step that will transpile ES6+ and polyfill appropriately for browser support.

Spark

Contribution Guide

Code Organization

Spark is managed as a monorepo. All of the Spark source code lives in a single repo, but is released as separate packages.

This repo consists of the design system packages, wrapped in an instance of Gatsby. Spark uses Gatsby for our main documentation site and Storybook for our component previews and developer documentation.

In the root there are three directories, react, angular and html. These house the files that are published to npm.

Dev Environment

If you want to run a copy of Gatsby locally:

  1. Navigate to the root directory of the project.
  2. Run npm install.
  3. Run npm start.
  4. Open your browser to http://localhost:8000/.

If you want to run a copy of Gatsby and Storybook locally:

  1. Navigate to the root directory of the project.
  2. Run npm run installall.
  3. Run npm start to start Gatsby then open your browser to http://localhost:8000/.
  4. Run (cd react/ ; npm run storybook) to start Storybook for React.
  5. Run (cd angular/ ; npm run storybook) to start Storybook for Angular.
  6. Run (cd html/ ; npm run storybook) to start Storybook for HTML.

Unit Tests

Spark uses the Jest test framework for unit tests. To run unit tests in Spark:

  1. Navigate to the framework directory of your choice from the root cd react, cd angular, or cd html.
  2. Run npm install if you have not already.
  3. Run npm test.
  4. See test output in terminal to determine number of passing or failed tests.

Code Style Standards

Spark follows specific coding styles for HTML, CSS and JavaScript to ensure maintainability and scalability.

HTML

CSS

JS

React and Angular

Change Workflow

Coming Soon

Credit

Gatsby StorybookJS