From 7fbbd7d0d16205670de1c7f9a97f6dc75b5ebd32 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 30 Jun 2025 13:20:01 +0800 Subject: [PATCH] ci: chromatic --- next-ui/chromatic.config.json | 8 ++++++++ next-ui/package-lock.json | 31 ++++++++++++++++++++++++++++--- next-ui/package.json | 4 +++- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 next-ui/chromatic.config.json diff --git a/next-ui/chromatic.config.json b/next-ui/chromatic.config.json new file mode 100644 index 00000000..d5624759 --- /dev/null +++ b/next-ui/chromatic.config.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://www.chromatic.com/config-file.schema.json", + "onlyChanged": true, + "projectId": "Project:686209edfaf1ea006b62decc", + "storybookBaseDir": "next-ui", + "zip": true, + "buildScriptName": "storybook:build" +} diff --git a/next-ui/package-lock.json b/next-ui/package-lock.json index bd4457d8..bcd17f40 100644 --- a/next-ui/package-lock.json +++ b/next-ui/package-lock.json @@ -40,6 +40,7 @@ "@vue/eslint-config-prettier": "^10.2.0", "@vue/eslint-config-typescript": "^14.5.1", "@vue/tsconfig": "^0.7.0", + "chromatic": "^13.0.1", "eslint": "^9.29.0", "eslint-config-prettier": "^10.1.5", "eslint-plugin-formatjs": "^5.4.0", @@ -308,6 +309,30 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, + "node_modules/@chromatic-com/storybook/node_modules/chromatic": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/chromatic/-/chromatic-12.2.0.tgz", + "integrity": "sha512-GswmBW9ZptAoTns1BMyjbm55Z7EsIJnUvYKdQqXIBZIKbGErmpA+p4c0BYA+nzw5B0M+rb3Iqp1IaH8TFwIQew==", + "dev": true, + "license": "MIT", + "bin": { + "chroma": "dist/bin.js", + "chromatic": "dist/bin.js", + "chromatic-cli": "dist/bin.js" + }, + "peerDependencies": { + "@chromatic-com/cypress": "^0.*.* || ^1.0.0", + "@chromatic-com/playwright": "^0.*.* || ^1.0.0" + }, + "peerDependenciesMeta": { + "@chromatic-com/cypress": { + "optional": true + }, + "@chromatic-com/playwright": { + "optional": true + } + } + }, "node_modules/@chromatic-com/storybook/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -4844,9 +4869,9 @@ } }, "node_modules/chromatic": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/chromatic/-/chromatic-12.2.0.tgz", - "integrity": "sha512-GswmBW9ZptAoTns1BMyjbm55Z7EsIJnUvYKdQqXIBZIKbGErmpA+p4c0BYA+nzw5B0M+rb3Iqp1IaH8TFwIQew==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/chromatic/-/chromatic-13.0.1.tgz", + "integrity": "sha512-vX0Rs/pAeFAnGuQiVrA4h0XD36MYbTUp9Mlm1jFqXo3Cejd2BdBY1CA+vd6CkeO5CRSc6TRWmCz0zQAsE1q3Hw==", "dev": true, "license": "MIT", "bin": { diff --git a/next-ui/package.json b/next-ui/package.json index 756511c3..afc13c8d 100644 --- a/next-ui/package.json +++ b/next-ui/package.json @@ -22,7 +22,8 @@ "i18n:compile": "formatjs compile-folder i18n src/i18n", "i18n:verify": "formatjs verify --missing-keys --source-locale=en \"i18n/*.json\"", "storybook:dev": "storybook dev -p 6006", - "storybook:build": "storybook build" + "storybook:build": "storybook build", + "chromatic": "npm run chromatic" }, "dependencies": { "@pinia/colada": "^0.17.1", @@ -57,6 +58,7 @@ "@vue/eslint-config-prettier": "^10.2.0", "@vue/eslint-config-typescript": "^14.5.1", "@vue/tsconfig": "^0.7.0", + "chromatic": "^13.0.1", "eslint": "^9.29.0", "eslint-config-prettier": "^10.1.5", "eslint-plugin-formatjs": "^5.4.0",