@teachers/design-system v7.0.6
design-system
Your one-stop shop for TeachersPayTeachers design system bits.
install
# install proper Node.js version
asdf install
# install dependencies
yarn
run
# start Storybook for development
yarn dev
tests
# run tests
yarn test
# run linting
yarn lint
# run linting for scripts only
yarn lint:scripts
# run linting for styles only
yarn lint:style
build
# cleans previous builds and build scripts and design tokens
# output goes to dist/ directory
yarn build
# build scripts only
yarn build:scripts
# build design tokens only
yarn build:design-tokens
# clean build
yarn clean
publish
Package publishing is currently manual and is done from the CLI. Automated CI publishing to come soon.
# push tags to Github repo
git push --follow-tags origin master
# publish to npm
npm publish --tag <tag to publish, e.g. 0.0.1>
contributing
release process
We use semantic versioning and a variation of conventional commits to version releases.
Here is a brief overview of the process:
- Fork branch off master, e.g.
my-feature
. Commit desired changes (does not have to be in conventional commits format, but it is encouraged) - Open PR for
my-feature
branch. - Wait for tests and checks to run.
- Title your PR according to the conventional commits convention.
- The Semantic Pull Request check will check that your PR title.
- If it does not pass, the check will remain in pending (yellow mode)
- Update accordingly and the check will automatically re-run.
- The PR title will be the commit message when squashed to master.
- Squash and merge to master
- We only allow squash and merge. This keeps the commit history clean and easy to parse.
- Each PR = one feature/fix/breaking change
- TODO standard-version will run in CI to generate CHANGELOG and version bump and publish to NPM
- JIRA ticket here: https://teacherspayteachers.atlassian.net/browse/WEB-2230
- This step has to be done manually for now. See publishing section above.
Note: If there is a BREAKING CHANGE, the phrase can and should appear anywhere in the commit history (not just PR title) for it to be picked up for versioning
conventional commits
Our convention is a subset of the conventional commits standard. Please read the following as it may be different from projects you have worked on in the past.
Each squashed PR commit message consists of a header and a body. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
The header is mandatory and the scope of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
types
We follow Angular-style commit types as follows:
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
scope
The scope of the commit should be a reference to a JIRA ticket, e.g. WEB-2184. This scope will appear in the CHANGELOG and will make it easy for us to track features in the CHANGELOG. This is not currently enforced in checks, but will be appreciated.
breaking changes
A commit that has the text BREAKING CHANGE: at the beginning of its optional body section introduces a breaking API change (correlating with MAJOR in semantic versioning). A BREAKING CHANGE can be part of commits of any type. It does not have to be part of the PR title.
examples
feat(WEB-2424): add Text and Heading components
fix(WEB-2346): fix bug where Tooltip was not rendering on hover
fix(WEB-1234): add missing prop for component
refactor: rename ComponentX to ComponentY
docs: update README with contribution guidelines
questions
Please contact #web-platform on Slack!
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago