Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/storybook 7 #191

Merged
merged 5 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy PR previews
concurrency: preview-${{ github.ref }}
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
permissions:
contents: write
pull-requests: write
jobs:
storybook:
uses: Neovici/cfg/.github/workflows/preview.yml@master
secrets: inherit
with:
skip_dist: true
2 changes: 2 additions & 0 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ jobs:
storybook:
uses: Neovici/cfg/.github/workflows/story.yml@master
secrets: inherit
with:
skip_dist: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
coverage/
/storybook-static/
yarn-error.log
debug.log
.eslintcache
Expand Down
30 changes: 28 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
module.exports = {
stories: ['../stories/**/*.stories.{js,mdx}'],
import rollupCommonjs from '@rollup/plugin-commonjs';
import esbuild from 'rollup-plugin-esbuild';

/** @type { import('@web/storybook-framework-web-components').StorybookConfig } */
const config = {
stories: ['../stories/**/*.stories.{js,ts,mdx}'],
addons: ['@storybook/addon-essentials', '@storybook/addon-links'],
framework: {
name: '@web/storybook-framework-web-components',
},
docs: {
autodocs: true,
},
core: {
disableTelemetry: true,
},
/* Try to make the build parse TS files */
async rollupFinal(config) {
// add extra configuration for rollup
// e.g. a new plugin
config.plugins.push(rollupCommonjs({}));
config.plugins.push(esbuild({}));

return config;
},
staticDirs: ['../stories/images'],
};

export default config;
Loading
Loading