@aflorithmic/aflr-storybook v0.2.35
β οΈ Important Setup Notes
This repo uses React 17.0.1. The parent repository MUST be the same version.
If using create-react-app:
- Change your package.json to
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.3",
- Update your index.js to use the old syntax
import React from "react";
import ReactDOM from "react-dom";
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
);
- As this repo uses styled component themes, they must be imported with ThemeProvider
yarn add styled-components
import theme from "@aflorithmic/aflr-storybook/dist/themes/theme";
import { ThemeProvider } from "styled-components";
<ThemeProvider theme={theme}>
<App goes here />
</ThemeProvider>;
π Quick start
Install the dependencies.
Navigate into your new siteβs directory and install the necessary dependencies.
# Navigate to the directory cd aflr-storybook/ # Install the dependencies yarn install # Run storybook yarn storybook
Storybook will open on http://localhost:6006
Open the source code and start editing!
Open the
aflr-storybook
directory in your code editor of choice and building your first component!
π What's inside?
A quick look at the top-level files and directories included with this repository.
.
βββ node_modules
βββ public
βββ src
βββ .gitignore
βββ .env
βββ LICENSE
βββ package.json
βββ yarn.lock
βββ README.md
node_modules
: This directory contains all of the modules of code that your project depends on (npm packages).public
: This directory will contain the development and production build of the site.src
: This directory will contain all of the code related to what you will see on your application..env
: This file will contain the necessary environment variables for your application..gitignore
: This file tells git which files it should not track or maintain during the development process of your project.LICENSE
: The storybook is licensed under the MIT licence.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.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).README.md
: A text file containing useful reference information about the project.
Running Tests
Run tests using jest
yarn test
Run tests and get the code coverage
yarn coverage
Contribute
If you encounter an issue with the repository, we encourage you to open an issue in this repository's repository.
Learning Storybook
- Read our introductory tutorial over at Storybook tutorials.
- Learn how to transform your component libraries into design systems in our Design Systems for Developers tutorial.
- See our official documentation at Storybook.
Releases
We should tag all future PRs with one of the labels: major, minor, patch, skip-release, prerelease, internal, documentation before merging them:
https://github.com/aflorithmic/aflr-storybook/labels
```bash
# Release a new version
yarn release
```
Publishing Commands
- Create .env file project root and add your credentials
SKIP_PREFLIGHT_CHECK=true
CHROMATIC_PROJECT_TOKEN=
NPM_TOKEN=
GITHUB_TOKEN=
- Login with npm
npm adduser
- Push the new build to chromatic
yarn chromatic
- Publish the code to npm
yarn publish
- Create a release on github... TBD
yarn auto release
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago