onda-creditbar v1.0.2
Styleguide
VTEX Styleguide React components (Docs)
Usage
For instructions on how to use the Styleguide in your project refer to the page itself: https://vtex.github.io/styleguide/.
Developing
Setup
yarn installRunning
yarn styleguideDeveloping using npm link
Run this in this repo:
yarn developIn your project run:
npm link @vtex/styleguideImport (case a <Button> component in lib):
import Button from '@vtex/styleguide/lib/Button'Testing
Developing new tests
To add tests to a component, just add a test file with the .test.js extension next to the component implementation.
Example:
react/components/Alert/
├── README.md
├── index.js
└── index.test.jsWe use react-testing-library to test our components.
Running tests
To run the test use:
yarn testYou can also pass the --watch flag:
yarn test --watchPublishing
To post the changelog on Github Release Notes, is required to configure a Personal Token. See more here
We use releasy to publish our styleguide. To publish on both npm and render(VTEX IO) with Github Release Notes, execute the command below:
releasy --stableDocs
To update the docs:
yarn deployKnown issues
Your project has to run with webpack >= 2. Here's a guide for upgrading Webpack to v2.
VTEX Styleguideis a project built to run on top of eithernpmorVTEX IO. To make this viable, we currently use twopackage.jsonfiles, one in the top repository folder fornpm, and one inside thereactfolder forVTEX IO. We are looking into how we can improve this architecture, but for now we have to live with duplicated dependencies in thesepackage.jsonfiles.For more info, please refer to https://github.com/vtex/styleguide/issues/483
We currently have two majors of the Styleguide,
8.xand9.x(master branch). Each major supports a specific VTEX's Render version. This means that we develop new features only on themasterbranch (9.x major) and do bug fixes on bothmasterand8.xbranches.