Skip to content

Commit 9301716

Browse files
authored
Merge pull request #787 from NoelDeMartin/780-vite
#780 Migrate to Vite, Vitest, and Storybook 10
2 parents 6a0dca8 + 7f74533 commit 9301716

215 files changed

Lines changed: 6717 additions & 13448 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
6262
env:
6363
PR_URL: ${{github.event.pull_request.html_url}}
64-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
64+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
6565

6666
npm-publish-dev:
6767
needs: build
@@ -107,12 +107,12 @@ jobs:
107107
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108108
run: |
109109
TAG="v$(node -p 'require("./package.json").version')"
110-
110+
111111
if gh release view "$TAG" >/dev/null 2>&1; then
112112
echo "Release $TAG already exists. Skipping."
113113
exit 0
114114
fi
115-
115+
116116
if git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
117117
echo "Tag $TAG already exists on origin. Creating release from existing tag."
118118
gh release create "$TAG" --verify-tag --generate-notes

.storybook/main.js

Lines changed: 0 additions & 93 deletions
This file was deleted.

.storybook/main.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import type { StorybookConfig } from '@storybook/web-components-vite'
2+
import { mergeConfig } from 'vite'
3+
4+
const config: StorybookConfig = {
5+
stories: ['../src/**/*.stories.ts'],
6+
addons: [
7+
'@storybook/addon-links',
8+
'@storybook/addon-docs',
9+
],
10+
framework: '@storybook/web-components-vite',
11+
12+
async viteFinal (config) {
13+
return mergeConfig(config, {
14+
resolve: {
15+
dedupe: ['lit', 'lit-html', 'lit-element', '@lit/reactive-element'],
16+
},
17+
optimizeDeps: {
18+
include: ['lit/directive-helpers.js'],
19+
},
20+
})
21+
},
22+
}
23+
24+
export default config

.storybook/preview.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

.storybook/preview.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import '../src/styles.css'
2+
3+
export const tags = ['autodocs']
4+
export const parameters = {}

0 commit comments

Comments
 (0)