Developing with WebApp
Npm allows you to point at any github branch, develop your component first, push to your branch, and point WebApp bright-components to that branch.
In order to do that, update
package.json with the commit hash you require and do an
It is also possible to use the branch name, but if you push further commits you'll need to use
Once demoed and tested, merge your bright-components PR to master.
Update the reference in WebApp to point to published version.
We use Styleguidist to provide living documentation for the components.
npm run styleguide and then hit
http://localhost:6060. This will update as you add to your component.
You'll probably want to run the following commands within the repo to ensure consistent line endings, since whilst Git will convert them for you, the linter expects LF, not CLRF:
$ git config core.eol lf
$ git config core.autocrlf input
$ git checkout-index --force --all
Create a new directory
icons in root, if one does not already exist on your local machine.
icon.svg to this folder.
Run the genIcons.js script with the following command
npm run genIcons.
icon.svg from the
We use semactic-release package to automate versioning and deployment to NPM. Commit messages should adhere to conventions here.
Here is an example of the release type that will be done based on a commit messages:
fix(pencil): stop graphite breaking when too much pressure applied
feat(pencil): add graphiteWidth option
feat(Modal): add new required prop to Modal
BREAKING CHANGE: All modals need GA prop now.
- When you squash and merge a PR onto master, make sure you put a "BREAKING CHANGE:" line in the commit message section.