|
| 1 | +<p align="center"> |
| 2 | + <a href="https://www.chromatic.com/"> |
| 3 | + <img alt="Chromatic" src="https://avatars2.githubusercontent.com/u/24584319?s=200&v=4" width="60" /> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<h1 align="center"> |
| 8 | + Chromatic's UI Testing Handbook React template |
| 9 | +</h1> |
| 10 | + |
| 11 | +This template ships with the main React and Storybook configuration files you'll need to get up and running fast. |
| 12 | + |
| 13 | +## 🚅 Quick start |
| 14 | + |
| 15 | +1. **Create the application.** |
| 16 | + |
| 17 | + Use [degit](https://github.com/Rich-Harris/degit) to get this template. |
| 18 | + |
| 19 | + ```shell |
| 20 | + # Clone the template |
| 21 | + npx degit chromaui/ui-testing-handbook-react-template ui-testing-guide-code |
| 22 | + ``` |
| 23 | + |
| 24 | +1. **Install the dependencies.** |
| 25 | + |
| 26 | + Navigate into your new site’s directory and install the necessary dependencies. |
| 27 | + |
| 28 | + ```shell |
| 29 | + # Navigate to the directory |
| 30 | + cd ui-testing-guide-code/ |
| 31 | +
|
| 32 | + # Install the dependencies |
| 33 | + yarn |
| 34 | + ``` |
| 35 | + |
| 36 | +1. **Open the source code and start editing!** |
| 37 | + |
| 38 | + Open the `ui-testing-guide-code` directory in your code editor of choice and building your first component! |
| 39 | + |
| 40 | +1. **Browse your stories!** |
| 41 | + |
| 42 | + Run `yarn storybook` to see your component's stories at `http://localhost:6006` |
| 43 | +
|
| 44 | +## 🔎 What's inside? |
| 45 | + |
| 46 | +A quick look at the top-level files and directories included with this template. |
| 47 | + |
| 48 | + . |
| 49 | + ├── .storybook |
| 50 | + ├── node_modules |
| 51 | + ├── public |
| 52 | + ├── src |
| 53 | + ├── .gitignore |
| 54 | + ├── .index.html |
| 55 | + ├── package.json |
| 56 | + ├── yarn.lock |
| 57 | + ├── vite.config.js |
| 58 | + └── README.md |
| 59 | + |
| 60 | +1. **`.storybook`**: This directory contains Storybook's [configuration](https://storybook.js.org/docs/react/configure/overview) files. |
| 61 | +
|
| 62 | +2. **`node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages). |
| 63 | +
|
| 64 | +3. **`public`**: This directory will contain the development and production build of the site. |
| 65 | +
|
| 66 | +4. **`src`**: This directory will contain all of the code related to what you will see on your application. |
| 67 | +
|
| 68 | +5. **`.gitignore`**: This file tells git which files it should not track or maintain during the development process of your project. |
| 69 | +
|
| 70 | +6. **`.index.html`**: This is the HTML page that is served when generating a development or production build. |
| 71 | +
|
| 72 | +7. **`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. |
| 73 | +
|
| 74 | +8. **`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).** |
| 75 | +
|
| 76 | +9. **`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. |
| 77 | +
|
| 78 | +10. **`README.md`**: A text file containing useful reference information about the project. |
| 79 | +
|
| 80 | +## Contribute |
| 81 | +
|
| 82 | +If you encounter an issue with the template, we encourage you to open an issue in this template's repository. |
| 83 | + |
| 84 | +## Learning Storybook |
| 85 | + |
| 86 | +1. Read our introductory tutorial at [Learn Storybook](https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/). |
| 87 | +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. |
| 88 | +3. See our official documentation at [Storybook](https://storybook.js.org/). |
0 commit comments