Skip to content

Commit 104bf13

Browse files
committed
chore: setup histoire
1 parent 827dc55 commit 104bf13

File tree

7 files changed

+40
-2
lines changed

7 files changed

+40
-2
lines changed

frappe-ui-logo-200.png

10.3 KB
Loading

histoire.config.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { defineConfig } from 'histoire'
2+
import { HstVue } from '@histoire/plugin-vue'
3+
import resolveConfig from 'tailwindcss/resolveConfig'
4+
import tailwindConfig from './tailwind.config.js'
5+
6+
const fullConfig = resolveConfig(tailwindConfig)
7+
8+
export default defineConfig({
9+
setupFile: './histoire.setup.ts',
10+
plugins: [HstVue()],
11+
theme: {
12+
title: 'Espresso Design System.',
13+
defaultColorScheme: 'light',
14+
hideColorSchemeSwitch: true,
15+
logo: {
16+
square: './frappe-ui-logo-200.png',
17+
light: './frappe-ui-logo-200.png',
18+
dark: './frappe-ui-logo-200.png',
19+
},
20+
colors: {
21+
gray: fullConfig.theme.colors.gray,
22+
primary: fullConfig.theme.colors.orange,
23+
},
24+
},
25+
})

histoire.setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './src/style.css'

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
"build": "vite build",
1616
"preview": "vite preview",
1717
"storybook": "storybook dev -p 6006",
18-
"build-storybook": "storybook build"
18+
"build-storybook": "storybook build",
19+
"story:dev": "histoire dev",
20+
"story:build": "histoire build",
21+
"story:preview": "histoire preview"
1922
},
2023
"files": [
2124
"src",
@@ -60,6 +63,7 @@
6063
"vue-router": "^4.1.6"
6164
},
6265
"devDependencies": {
66+
"@histoire/plugin-vue": "^0.16.1",
6367
"@storybook/addon-essentials": "^7.0.0-beta.61",
6468
"@storybook/addon-interactions": "^7.0.0-beta.61",
6569
"@storybook/addon-links": "^7.0.0-beta.61",
@@ -70,6 +74,7 @@
7074
"@vitejs/plugin-vue": "^4.0.0",
7175
"autoprefixer": "^10.4.13",
7276
"cross-fetch": "^3.1.5",
77+
"histoire": "^0.16.2",
7378
"husky": ">=6",
7479
"lint-staged": ">=10",
7580
"postcss": "^8.4.21",

postcss.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

src/env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference types="vite/client" />
2+
/// <reference types="@histoire/plugin-vue/components" />

src/vite-env.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)