-
Notifications
You must be signed in to change notification settings - Fork 1
Create template from scratch
Dương Tiến Vinh edited this page Jul 7, 2022
·
3 revisions
yarn create vite
cd <project-name-folder>
yarn install
yarn add react-router-dom@latest
- Prettier: prettier
- Eslint: eslint, eslint-plugin-react
- Storybook: @storybook/addon-postcss
yarn add --save-dev prettier eslint eslint-plugin-react @storybook/addon-postcss
-
Install package:
yarn add --dev vite-plugin-windicss windicss
-
Follow instructions from windicss documentation: https://windicss.org/integrations/vite.html
-
Install "sort class" plugin for windicss (from tailwindcss):
NOTE: Create "tailwind.config.js" to avoid errors. Tailwind plugins don't support windicss functions, such as: addDynamic,...
yarn add --dev prettier-plugin-tailwindcss
-
Create storybook:
npx sb init
-
Fix storybook error "ERR_OSSL_EVP_UNSUPPORTED":
Edit npm script:
"storybook": "SET NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
yarn add @mantine/hooks @mantine/core
NOTE: Override Mantine configs with WindiCSS configs. More detail in file
CustomMantineProvider.jsx
.
NOTE: This project is loaded with Google Fonts: Inter, Barlow, Roboto Slab, Space Mono.
I still keep base Mantine configs if windicss doesn't have those configs (lines commented with: "Base Mantine")