Indigo UI
Indigo UI library, its CSS and React components. Also Styleguide app showing usages of this library.
Development
- Make sure you have Node 8 installed
node -v
- Install grunt:
npm install -g grunt
- Install dependencies:
yarn
- Run storybook
yarn storybook
- Open browser at http://localhost:9009/
Docker
- Build:
docker-compose build
(See Dockerfile
to check what's inside) - Run container:
docker-compose run --rm --service-ports node
- Continue from step 3. (including) in section above (
yarn
, yarn storybook
, ...)
Simultaneously with Keboola Connection (Docker only)
Check KBC.md
Deployment
First, check the content of .travis.yml
file and documentation about
Travis Deployment.
Storybook
- Storybook is deployed on every push to
master
branch. There's "$TRAVIS_BRANCH" = "master"
condition in .travis.yml
. - The
deploy-storybook.sh
script is responsible for deploying. Basically, it's a "home made"
replacement for Travis deploy
section, since that section is used for something else (covered
bellow). - After successful deployment, the Storybook build will be available online
Releasing new version
- Before pushing new tag, make sure you know what are you doing.
- New tagged release is only needed if there's a change in
src/indigo
or src/components
folders
and you want to make those changes available for users. - Please respect Semantic versioning
Steps:
- Make sure everything is working as expected
- Prepare new version with
yarn version
command. Just follow instructions. This command should create new commit (with
version change in package.json
) and tag for you. There's no need to change package.json
manually or create tag manually. - Push to
master
branch - e.g git push origin master
- Check if everything is as expected
- Push newly created tag - e.g.
git push origin v2.0.0-beta-3
<- This triggers deploy! - Check package in npmjs registry, try to install it or update to newer version from some project
- Write release notes keboola/indigo-ui/releases
FAQ
How to check what will be published to npmjs registry before pushing new tag?
Run npm pack
. Check its manual here.
How to run tests?
Run yarn test
. It'll start tests in interactive mode.
How to create new component?
- Create new component file in
src/indigo/components
(e.g. Loader.jsx
). - Add tests (if needed) and snapshots for new component (e.g.
Loader.test.js
). - Add new component to main file
src/indigo/components/index.js
to enable its export.