Skip to content

Commit

Permalink
WIP: debug Turbosnap
Browse files Browse the repository at this point in the history
  • Loading branch information
KannoStanfoot committed Apr 24, 2024
1 parent 6fa5124 commit 5962bb1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,14 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: git fetch origin ${{ github.base_ref }} --depth=1

- id: diff
run: echo "::set-output name=changed::$(git diff --name-only origin/${{ github.base_ref }} HEAD --relative ./packages/ui/ | wc -l)"

- name: Install packages
uses: ./.github/actions/install-packages
- name: Run Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/ui
untraced: \"./packages/!(ui)/**\"
exitZeroOnChanges: true
onlyChanged: true
diagnostics: true
storybookBaseDir: ./packages/ui
env:
LOG_LEVEL: 'debug'
5 changes: 4 additions & 1 deletion packages/ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ module.exports = {
return mergeConfig(config, {
plugins:
configType === 'PRODUCTION'
? [turbosnap({ rootDir: process.cwd() }), svgLoader({ defaultImport: 'component' })]
? [
turbosnap({ rootDir: config.root ?? process.cwd() }),
svgLoader({ defaultImport: 'component' }),
]
: [svgLoader({ defaultImport: 'component' })],
resolve: {
alias: {
Expand Down
10 changes: 10 additions & 0 deletions packages/ui/components/forms/TextAreaField.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@ export const vModel: Story = {
</div>`,
})
}

export const wipDebugTurbosnap: Story = {
name: 'with error message',
args: {
id: 'detail',
name: 'detail',
label: 'お問い合わせ内容/Content',
errorMessage: 'Turbosnap動作確認用',
},
}

0 comments on commit 5962bb1

Please sign in to comment.