Change build instructions

This commit is contained in:
Arnaud 2024-08-20 15:57:59 +02:00
parent d24b7ba636
commit 3640027d2b
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
5 changed files with 25 additions and 2 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules node_modules
storybook-static

View File

@ -26,3 +26,17 @@ npm install
``` ```
npm run storybook npm run storybook
``` ```
## Build (for deployment)
```
npm run build-storybook
```
The files are generated under the folder storybook-static.
You can preview by using the command:
```
npm run preview
```

View File

@ -9,7 +9,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview", "preview": "npx http-server ./storybook-static",
"format": "prettier --write ./src", "format": "prettier --write ./src",
"storybook": "storybook dev -p 6006", "storybook": "storybook dev -p 6006",
"build-storybook": "storybook build" "build-storybook": "storybook build"

View File

8
vite.config.ts Normal file
View File

@ -0,0 +1,8 @@
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
worker: {
format: "es",
},
});