Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

on: [push]

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install dependencies
run: npm install --ignore-scripts

- name: Build
run: |
npm run build

- name: Build Storybook
run: |
npm run build-storybook
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x

- name: Install dependencies
run: npm install --ignore-scripts
Expand Down
File renamed without changes.
23 changes: 7 additions & 16 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
import { defineMain } from "@storybook/react-vite/node";

const config = defineMain({
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"./local-preset.js",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
};
addons: ["@storybook/addon-docs", "./local-preset.cjs"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to .cjs to be correct

framework: "@storybook/react-vite",
});

export default config;
2 changes: 1 addition & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Preview } from "@storybook/react";
import type { Preview } from "@storybook/react-vite";

const preview: Preview = {
parameters: {
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Storybook addons are listed in the [catalog](https://storybook.js.org/addons) an

To help the community use your addon and understand its capabilities, please document it thoroughly.

To get started, replace this README with the content in this sample template, modeled after how essential addons (like [Actions](https://storybook.js.org/docs/essentials/actions)) are documented. Then update the content to describe your addon.
To get started, replace this README with the content in this sample template.

### Sample documentation template

Expand All @@ -124,7 +124,7 @@ import type { StorybookConfig } from '@storybook/your-framework';
const config: StorybookConfig = {
// ...rest of config
addons: [
'@storybook/addon-essentials'
'@storybook/addon-docs'
'my-addon', // 👈 register the addon here
],
};
Expand Down Expand Up @@ -183,14 +183,14 @@ registering the addon, like so:
// .storybook/main.ts

// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';
import type { StorybookConfig } from "@storybook/your-framework";

const config: StorybookConfig = {
// ...rest of config
addons: [
'@storybook/essentials',
"@storybook/addon-docs",
{
name: 'my-addon',
name: "my-addon",
options: {
// 👈 options for my-addon go here
},
Expand All @@ -206,7 +206,6 @@ export default config;
Type: `boolean`

Enable experimental behavior to...

````

## Release Management
Expand Down
Loading
Loading