An open API service indexing awesome lists of open source software.

https://github.com/chromaui/learnstorybook-visual-testing-code

Code repository for the Visual Testing handbook
https://github.com/chromaui/learnstorybook-visual-testing-code

learning storybook visual-testing

Last synced: 3 months ago
JSON representation

Code repository for the Visual Testing handbook

Awesome Lists containing this project

README

          



Chromatic


Chromatic's Visual Testing Handbook React template

This template ships with the main React and Storybook configuration files you'll need to get up and running fast.

## πŸš… Quick start

1. **Create the application.**

Use [degit](https://github.com/Rich-Harris/degit) to get this template.

```shell
# Clone the template
npx degit chromaui/visual-testing-handbook-react-template commentlist
```

1. **Install the dependencies.**

Navigate into your new site’s directory and install the necessary dependencies.

```shell
# Navigate to the directory
cd commentlist/

# Install the dependencies
yarn
```

1. **Open the source code and start editing!**

Open the `commentlist` directory in your code editor of choice and build your first component!

1. **Browse your stories!**

Run `yarn storybook` to see your component's stories at `http://localhost:6006`

## πŸ”Ž What's inside?

A quick look at the top-level files and directories included with this template.

.
β”œβ”€β”€ .storybook
β”œβ”€β”€ .yarn
β”œβ”€β”€ node_modules
β”œβ”€β”€ public
β”œβ”€β”€ src
β”œβ”€β”€ .eslintrc.cjs
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .yarnrc.yml
β”œβ”€β”€ index.html
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.app.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ tsconfig.node.json
β”œβ”€β”€ yarn.lock
β”œβ”€β”€ vite.config.js
└── README.md

1. **`.storybook`**: This directory contains Storybook's [configuration](https://storybook.js.org/docs/configure) files.

2. **`.yarn`**: This directory contains the configuration files for Yarn including the cache and the global packages.

3. **`node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages).

4. **`public`**: This directory will contain the development and production build of the site.

5. **`src`**: This directory will contain all of the code related to what you will see on your application.

4. **`eslintrc.cjs`**: This file is the configuration file for [ESLint](https://eslint.org/).

5. **`.gitignore`**: This file tells git which files it should not track or maintain during the development process of your project.

6. **`.yarnrc.yml`**: This file contains the configuration for Yarn. It's used to define the project's settings, such as caching and other settings.

7. **`index.html`**: This is the HTML page that is served when generating a development or production build.

8. **`LICENSE`**: The template is licensed under the MIT licence.

9. **`package.json`**: Standard manifest file for Node.js projects, which typically includes project specific metadata (such as the project's name, the author among other information). It's based on this file that npm will know which packages are necessary to the project.

10. **`tsconfig.app.json`**: This file contains the TypeScript compiler options for the project.

11. **`tsconfig.json`**: This file is the root TypeScript configuration file that specifies the root files and the compiler options required to compile the project.

12. **`tsconfig.json`**: This file is the root TypeScript configuration file that specifies the root files and the compiler options that could be extended by other configuration files in the project.

13. **`tsconfig.node.json`**: This file contains the TypeScript compiler options required to manage the Node.js environment in the project configuration files. Used to help distinguish between configurations for different parts of the project.

14. **`vite.config.js`**: This is the configuration file for [Vite](https://vitejs.dev/), a build tool that aims to provide a faster and leaner development experience for modern web projects.

15. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(Do not change it manually).**

16. **`README.md`**: A text file containing useful reference information about the project.

## Contribute

If you encounter an issue with the code, we encourage you to open an issue.

## Learning Storybook

1. Read our introductory tutorial at [Learn Storybook](https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/).
2. Learn how to transform your component libraries into design systems in our [Design Systems for Developers](https://storybook.js.org/tutorials/design-systems-for-developers/) tutorial.
3. Learn the basics of visual testing in our [Visual Testing handbook](https://storybook.js.org/tutorials/visual-testing-handbook/).
4. See our official documentation at [Storybook](https://storybook.js.org/).