0.3.0 • Published 8 years ago
bea-ui v0.3.0
Bea UI
React Web Components
Getting started
Clone the repo and install Node dependencies
git clone https://github.com/craigharvi3/bea-ui.git
yarn installDevelopment
Components
Getting started
- Run
yarn styleguide, this command will start a server at http://0.0.0.0:6060 and watch for changes in the code. - React components live in the
componentsfolder. Each component should be built in its own folder using Atomic design.
Testing components
We are using Mocha, Enzyme and Sinon to test components.
- Create
component-name.test.jsin the component folder. - Components generally have a should render and should not render describe block as a minimum.
- Run
yarn test
Production
- Run
yarn add bea-uito include the library from NPM. - Import the component in your page:
import { Component } from 'bea-ui';
Publish styleguide
To see changes in Bea UI on <insert styleguide link here>, styleguide needs to be published.
- Run
yarn styleguide:publishfrommaster
How is it published:
gh-pages is a branch used by GitHub to create public version of the styleguide.
yarn styleguide:publish is running git subtree push --prefix styleguide origin gh-pages,
to copy the contents of /styleguide directory into gh-pages branch.
Release to NPM
Bump version in
package.jsonas part of the pull request.Update
/distfolder with the latest version:
yarn buildPublish the styleguide (
yarn styleguide:publish) frommaster.Log in to NPM:
npm login- Once the pull request is merged, check out the
masterbranch, and publish from master:
npm publish- Create tag corresponding to the package version.
git tag -a v1.4.2 -m "Release 1.4.2"
git push --tags- Create the release on GitHub. Describe release on GitHub using release template from any.