@vtex/styleguide
v5.6.5
Published
> VTEX Styleguide React components ([Docs](https://vtex.github.io/styleguide))
Maintainers
Keywords
Readme
Styleguide
VTEX Styleguide React components (Docs)
Usage
VTEX IO Apps
Add the styleguide to dependencies on manifest.json:
"dependencies": {
"vtex.styleguide": "5.x"
},Importing components:
import { Button } from 'vtex.styleguide'Other Projects
yarn add @vtex/styleguide --exact
# or
npm install @vtex/styleguide --save-exactImporting components:
import Button from '@vtex/styleguide/lib/Button'Developing
Setup
yarn installRunning
yarn styleguideSnapshots
To save the components snapshots use:
yarn snap:testCheck the snapshots and to approve the changes use:
yarn snap:approveYou can use the option --filter to just test or approve a specific component. Example:
yarn snap:approve --filter "Button"Developing 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'Publishing
We use releasy to publish our styleguide. To publish on both npm and render(VTEX IO), execute the command below:
releasy --stable --npm Also, if you want to post the changelog on Github Release Notes, is required to configure a Personal Token. See more here. When you have the environment set, add a --notes flag, For example:
releasy --stable --npm --notesDocs
To update the docs:
yarn deployKnown issues
- Your project has to run with webpack >= 2. Here's a guide for upgrading Webpack to v2.
