diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 0000000..e1a4804 --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,30 @@ +name: "Chromatic" + +on: push + +jobs: + chromatic: + name: Run Chromatic + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + - uses: pnpm/action-setup@v4 + with: + version: 9.4.0 + run_install: true + - name: Install dependencies + run: pnpm install + - name: Build the plugin + run: pnpm build + - name: Run Chromatic + uses: chromaui/action@latest + with: + # ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + workingDir: example diff --git a/biome.json b/biome.json index 49bec8d..455bc83 100644 --- a/biome.json +++ b/biome.json @@ -19,7 +19,8 @@ ".vite-inspect/**/*", "**/node_modules/**/*", "example/storybook-static/**/*", - ".tsup/**" + ".tsup/**", + "package.json" ] } } diff --git a/example/package.json b/example/package.json index 591c43a..e16cf15 100644 --- a/example/package.json +++ b/example/package.json @@ -42,6 +42,7 @@ "@vitest/browser": "^2.0.5", "autoprefixer": "^10.4.19", "bootstrap": "^5.3.3", + "chromatic": "^11.7.0", "happy-dom": "^14.12.3", "jsdom": "^24.1.1", "playwright": "^1.45.3", diff --git a/package.json b/package.json index 273676d..edb3066 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,11 @@ "name": "vite-plugin-storybook-nextjs", "version": "1.0.1", "description": "", - "keywords": [ - "vite-plugin", - "nextjs", - "storybook", - "vitest" - ], + "keywords": ["vite-plugin", "nextjs", "storybook", "vitest"], "author": "Storybook Bot ", "license": "MIT", - "sideEffects": [ - "./src/polyfills/promise-with-resolvers.ts" - ], - "files": [ - "dist" - ], + "sideEffects": ["./src/polyfills/promise-with-resolvers.ts"], + "files": ["dist"], "type": "module", "exports": { ".": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9549898..d582bb9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -149,6 +149,9 @@ importers: bootstrap: specifier: ^5.3.3 version: 5.3.3(@popperjs/core@2.11.8) + chromatic: + specifier: ^11.7.0 + version: 11.7.0 happy-dom: specifier: ^14.12.3 version: 14.12.3 @@ -2329,8 +2332,8 @@ packages: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==, tarball: https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz} engines: {node: '>=10'} - chromatic@11.5.4: - resolution: {integrity: sha512-+J+CopeUSyGUIQJsU6X7CfvSmeVBs0j6LZ9AgF4+XTjI4pFmUiUXsTc00rH9x9W1jCppOaqDXv2kqJJXGDK3mA==, tarball: https://registry.npmjs.org/chromatic/-/chromatic-11.5.4.tgz} + chromatic@11.7.0: + resolution: {integrity: sha512-Afblm4MWK6GXutxHPJVWKoY1PxCD98Uw0S3/f1a2wu4VTQy97g4+G8vPVqutSMpZFGzG5NjH9QdzKPFMmZczpw==, tarball: https://registry.npmjs.org/chromatic/-/chromatic-11.7.0.tgz} hasBin: true peerDependencies: '@chromatic-com/cypress': ^0.*.* || ^1.0.0 @@ -6028,7 +6031,7 @@ snapshots: '@chromatic-com/storybook@1.5.0(react@18.3.1)': dependencies: - chromatic: 11.5.4 + chromatic: 11.7.0 filesize: 10.1.2 jsonfile: 6.1.0 react-confetti: 6.1.0(react@18.3.1) @@ -7635,7 +7638,7 @@ snapshots: chownr@2.0.0: {} - chromatic@11.5.4: {} + chromatic@11.7.0: {} citty@0.1.6: dependencies: