generated from storybookjs/addon-kit
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from storybookjs/experimental-support-svelte-v5
Experimental support for Svelte 5
- Loading branch information
Showing
156 changed files
with
18,882 additions
and
10,872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Check | ||
|
||
on: [push] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
CI: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
# https://github.com/actions/checkout | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Enable corepack (for pnpm) | ||
# https://nodejs.org/api/corepack.html | ||
run: corepack enable | ||
|
||
- name: Setup Node.js | ||
# https://github.com/actions/setup-node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install Node.js dependencies with pnpm | ||
# https://pnpm.io/cli/install | ||
run: > | ||
pnpm install | ||
--frozen-lockfile | ||
- name: Build package | ||
run: > | ||
pnpm build | ||
- name: Run svelte-check | ||
run: > | ||
pnpm check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,49 @@ | ||
name: "Chromatic" | ||
name: Chromatic | ||
|
||
on: push | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Enable corepack (for pnpm) | ||
# https://nodejs.org/api/corepack.html | ||
run: corepack enable | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: true | ||
- name: Publish to Chromatic | ||
uses: chromaui/action@v1 | ||
cache: 'pnpm' | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install Node.js dependencies with pnpm | ||
# https://pnpm.io/cli/install | ||
run: > | ||
pnpm install | ||
--frozen-lockfile | ||
- name: Build package | ||
run: > | ||
pnpm run build | ||
- name: Upload to Chromatic | ||
uses: chromaui/action@v11 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
onlyChanged: true | ||
exitOnceUploaded: true | ||
|
||
- name: Upload "Examples" to Chromatic | ||
uses: chromaui/action@v11 | ||
env: | ||
EXAMPLES_ONLY: true | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_EXAMPLES_ONLY }} | ||
onlyChanged: true | ||
exitOnceUploaded: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,26 +7,30 @@ jobs: | |
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@v3 | ||
|
||
- name: Prepare repository | ||
run: git fetch --unshallow --tags | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 'Set git user' | ||
run: | | ||
git config --global user.name 'storybook-bot' | ||
git config --global user.email '[email protected]' | ||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
- name: Enable corepack (for pnpm) | ||
# https://nodejs.org/api/corepack.html | ||
run: corepack enable | ||
|
||
- name: Install dependencies | ||
uses: pnpm/action-setup@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
version: 8 | ||
run_install: true | ||
cache: 'pnpm' | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install Node.js dependencies with pnpm | ||
# https://pnpm.io/cli/install | ||
run: > | ||
pnpm install | ||
--frozen-lockfile | ||
- name: Create Release | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test | ||
|
||
on: [push] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
CI: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
# https://github.com/actions/checkout | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Enable corepack (for pnpm) | ||
# https://nodejs.org/api/corepack.html | ||
run: corepack enable | ||
|
||
- name: Setup Node.js | ||
# https://github.com/actions/setup-node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install Node.js dependencies with pnpm | ||
# https://pnpm.io/cli/install | ||
run: > | ||
pnpm install | ||
--frozen-lockfile | ||
- name: Run tests with Vitest | ||
# https://vitest.dev/guide/cli.html | ||
run: > | ||
pnpm vitest run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
.vite-inspect/ | ||
.svelte-kit/ | ||
dist/ | ||
node_modules/ | ||
storybook-static/ | ||
build-storybook.log | ||
package-lock.json | ||
.DS_Store | ||
.env | ||
*.log | ||
*.log | ||
|
||
# .d.ts files generated by `svelte-package` | ||
examples/**/*.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
dist | ||
tests/__compiled__ | ||
pnpm-lock.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
import type { StorybookConfig } from '@storybook/svelte-vite'; | ||
|
||
const examplesOnly = process.env.EXAMPLES_ONLY === 'true'; | ||
|
||
const config: StorybookConfig = { | ||
stories: [ | ||
'../**/*.mdx', | ||
{ | ||
directory: '../examples', | ||
files: '**/*.stories.@(ts|svelte)', | ||
titlePrefix: examplesOnly ? undefined : 'Examples', | ||
}, | ||
!examplesOnly && { | ||
directory: '../tests/stories', | ||
files: '**/*.stories.@(ts|svelte)', | ||
titlePrefix: 'Tests', | ||
}, | ||
].filter(Boolean) as StorybookConfig['stories'], | ||
framework: '@storybook/svelte-vite', | ||
stories: [{ | ||
directory: '../stories', | ||
files:'**/*.stories.svelte', | ||
titlePrefix:'Demo' | ||
}], | ||
addons: [ | ||
'../dist/preset/index.js', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
], | ||
docs: { | ||
autodocs: 'tag' | ||
} | ||
addons: ['../dist/preset.js', '@storybook/addon-essentials', '@storybook/addon-interactions'], | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.