humanmade / hm-pattern-library

Juniper is the web style guide and pattern library for Human Made projects.
https://humanmade.github.io/hm-pattern-library/
25 stars 8 forks source link

Juniper

The Human Made Web Style Guide and Pattern Library. Head over to humanmade.github.io/hm-pattern-library to see it in action!

Maintained by:

Usage Instructions

Refer to the documentation for full usage instructions.

Contributing and Development

PRs merged to the main branch will be automatically built using CircleCI. Generated assets will be pushed to a main-built branch by the CI deploy task, and the /dist/ folder from this build will be pushed to the gh-pages branch.

The gh-pages branch is the release branch for this project. Release tags should only be created on gh-pages.

Set up

Run these commands to get it running locally

  1. git clone git@github.com:humanmade/hm-pattern-library.git hm-pattern-library
  2. cd hm-pattern-library
  3. nvm use to select the project's required node version using nvm
  4. npm install
  5. The sass and html can be compiled by running the command npm run build.

The Human Made pattern library generates flat HTML and does not require a web server to be loaded. Once compiled, the HTML can be opened in your browser via the file system. You can simply access the compiled index file directly at …/dist/index.html

Workflow.

All local development should be done against the main branch. dist (which contains the compiled files) is ignored from version control and must be created using the gulp task. Releases are just the content of dist and nothing else.

Creating a branch

All contributions should relate to an issues. If the issue does not exist, open an issue in the original repository, this will give your issue a number.

When creating a branch, name your branch [issue-number]-short-summary.

Submitting a pull request

Before submitting a pull request, you will need to confirm your sass meets our coding standards by running gulp lint-sass.

When you push your branch, you will be able to submit a pull request. Travis CI runs on the repository and will need to pass on all pull requests.

If Travis CI fails, you can push further commits to the branch to fix the build.

CSS Naming convention

This project follows the BEM CSS naming convention.

Components

Sub-components are indicated with an __, variants with a --

In the styles/components directory, components should be placed in a file named for the component, _component.scss.

Utilities

Utilities are prefixed with util-, for example util-clearfix. A utility should be placed in the styles/utilities directory in a file named for the utility, _clearfix.scss.

Vendor files

Class names in vendor files should not be changed, the files should be placed in the styles/vendor directory and included as any other file would be included. These files do not need to meet our linting standards.

Adding a new Icons

Changelog

3.0.0

2.1.0

2.0.3

2.0.2

2.0.1

2.0

1.0.5

1.0.4

1.0.3

1.0.2

1.0.1

1.0.0