-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit moves the contribution instructions to CONTRIBUTING.md and adds installation instructions to README.me and the welcome story for Storybook. Fixes #626
- Loading branch information
1 parent
4c7b036
commit 167a21b
Showing
3 changed files
with
68 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,50 @@ | ||
# Contributing | ||
|
||
Thanks for contributing to the Cloud Four Pattern Library! | ||
|
||
## Getting Started | ||
|
||
1. `npm ci` — to install dependencies | ||
1. `npm run storybook` — to run a local instance of Storybook | ||
|
||
## Building | ||
|
||
- `npm run build` — Builds CSS+JS for npm package | ||
- `npm run build-storybook` — Creates a static storybook site build, for example for publishing the pattern library to Netlify | ||
|
||
## Project Structure | ||
|
||
``` | ||
cloudfour.com-patterns | ||
├── .github # GitHub workflows and templates | ||
├── .storybook | ||
│ ├── main.js # Settings for Storybook UI | ||
│ └── preview.js # Settings for story previews | ||
├── .theo # Settings for design token processing | ||
├── gulpfile.js | ||
│ └── tasks/*.js # Complex build tasks | ||
├── src | ||
│ ├── **/*.scss # Styles (Sass) | ||
│ ├── **/*.stories.mdx # Documentation (Storybook Docs) | ||
│ ├── **/*.twig # Templates (Twig) | ||
│ └── **/*.yml # Design tokens (Theo) | ||
├── .editorconfig # Low-level code consistency | ||
├── .nvmrc # Node version (used by Netlify) | ||
├── .svgo.yml # Inline SVG optimization settings | ||
├── CONTRIBUTING.md # ⬅️ You are here! | ||
├── README.md # Pattern library install instructions | ||
├── netlify.toml # Netlify build settings | ||
└── package.json # Project info and dependencies | ||
``` | ||
|
||
## Publishing to npm | ||
|
||
1. `git checkout v-next` | ||
2. `git pull` | ||
3. Make sure you have a clean working tree (`git status` should show no changes) | ||
4. `npm publish` - This will automatically install and compile everything, run linting, and publish | ||
4. `npm version` - This will bump the version number in `package.json` and `package-lock.json` | ||
5. `npm publish --access public` - This will automatically install and compile everything, run linting, and publish | ||
|
||
You can run `npm publish --dry-run` to see everything that _would_ happen during publish, without actually publishing to the npm registry. | ||
|
||
Note the branch is `v-next` for now. When we we merge this branch to master, these instructions should be updated. | ||
Note the branch is `v-next` for now. When we we merge this branch to `master`, these instructions should be updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters