Skip to content

Commit

Permalink
chore: fix turbosnap setting
Browse files Browse the repository at this point in the history
  • Loading branch information
KannoStanfoot committed Apr 21, 2024
1 parent 596e8a1 commit 6fa5124
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Chromatic CI

on:
# push:
# branches:
# - main
pull_request:
branches:
- main
on: push

jobs:
chromatic:
Expand All @@ -25,24 +19,17 @@ jobs:

- 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
if: ${{ steps.diff.outputs.changed != '0' }}

# - name: Chromatic
# uses: chromaui/action@latest
# if: ${{ steps.diff.outputs.changed != '0' }}
# with:
# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
# workingDir: packages/ui
# exitZeroOnChanges: true
# onlyChanged: true
# env:
# LOG_LEVEL: 'debug'

- name: Chromatic
if: ${{ steps.diff.outputs.changed != '0' }}
run: |
bun build-storybook
bunx chromatic -d ./packages/ui/storybook-static --storybook-base-dir ./packages/ui --project-token ${{ secrets.CHROMATIC_PROJECT_TOKEN }} --exit-zero-on-changes --only-changed
- name: Run Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/ui
exitZeroOnChanges: true
onlyChanged: true
diagnostics: true
storybookBaseDir: ./packages/ui
env:
LOG_LEVEL: 'debug'
2 changes: 1 addition & 1 deletion packages/ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
return mergeConfig(config, {
plugins:
configType === 'PRODUCTION'
? [turbosnap({ rootDir: config.root }), svgLoader({ defaultImport: 'component' })]
? [turbosnap({ rootDir: process.cwd() }), svgLoader({ defaultImport: 'component' })]
: [svgLoader({ defaultImport: 'component' })],
resolve: {
alias: {
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/components/forms/TextAreaField.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ export const vModel: Story = {
return { args,detail }
},
template: `<div style="width: 400px;">
<p>親コンポーネント側のv-model値: {{ detail }}</p>
<p>v-model value: {{ detail }}</p>
<TextAreaField v-model:inputted-text="detail" :="args" />
</div>`,
})

}

0 comments on commit 6fa5124

Please sign in to comment.