bea-ui

0.3.0 • Public • Published

Bea UI

React Web Components

Getting started

Clone the repo and install Node dependencies

git clone https://github.com/craigharvi3/bea-ui.git
yarn install

Development

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 components folder. 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.js in 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-ui to 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:publish from master

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

  1. Bump version in package.json as part of the pull request.

  2. Update /dist folder with the latest version:

yarn build
  1. Publish the styleguide (yarn styleguide:publish) from master.

  2. Log in to NPM:

npm login
  1. Once the pull request is merged, check out the master branch, and publish from master:
npm publish
  1. Create tag corresponding to the package version.
git tag -a v1.4.2 -m "Release 1.4.2"
git push --tags
  1. Create the release on GitHub. Describe release on GitHub using release template from any.

Package Sidebar

Install

npm i bea-ui

Weekly Downloads

8

Version

0.3.0

License

MIT

Last publish

Collaborators

  • craigharvie