File tree Expand file tree Collapse file tree 6 files changed +49
-1
lines changed Expand file tree Collapse file tree 6 files changed +49
-1
lines changed Original file line number Diff line number Diff line change
1
+ CHROMATIC_PROJECT_TOKEN =
Original file line number Diff line number Diff line change
1
+ name : Chromatic CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ chromatic :
13
+ runs-on : ubuntu-latest
14
+
15
+ strategy :
16
+ matrix :
17
+ node-version : [18.19.0]
18
+
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+
22
+ - name : Install packages
23
+ uses : ./.github/actions/install-packages
24
+
25
+ - name : Chromatic
26
+ uses : chromaui/action@latest
27
+ with :
28
+ projectToken : ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
29
+ workingDir : packages/ui
30
+ exitZeroOnChanges : true
31
+ onlyChanged : true
Original file line number Diff line number Diff line change
1
+ import { mergeConfig } from 'vite'
2
+ import turbosnap from 'vite-plugin-turbosnap'
3
+
1
4
module . exports = {
2
5
stories : [ '../components/**/*.stories.mdx' , '../components/**/*.stories.@(js|ts)' ] ,
3
6
addons : [
@@ -14,4 +17,12 @@ module.exports = {
14
17
} ,
15
18
} ,
16
19
} ,
20
+ async viteFinal ( config , { configType } ) {
21
+ return mergeConfig ( config , {
22
+ plugins :
23
+ configType === 'PRODUCTION'
24
+ ? [ turbosnap ( { rootDir : config . root ?? process . cwd ( ) } ) ]
25
+ : [ ] ,
26
+ } )
27
+ } ,
17
28
}
Original file line number Diff line number Diff line change 21
21
"@vitejs/plugin-vue" : " 5.0.3" ,
22
22
"@vuejs-jp/eslint-config" : " workspace:*" ,
23
23
"@vuejs-jp/typescript-config" : " workspace:*" ,
24
+ "chromatic" : " 10.9.4" ,
24
25
"storybook" : " 7.6.12" ,
26
+ "vite-plugin-turbosnap" : " 1.0.3" ,
25
27
"vue" : " 3.4.15" ,
26
28
"typescript" : " 5.3.3"
27
29
},
Original file line number Diff line number Diff line change 1
1
{
2
2
"$schema" : " https://turbo.build/schema.json" ,
3
3
"globalDependencies" : [" **/.env.*local" ],
4
+ "globalDotEnv" : [" .env" ],
4
5
"pipeline" : {
5
6
"build" : {
6
7
"dependsOn" : [" ^build" ],
7
- "outputs" : [" .nuxt/**" , " !.nuxt/cache/**" ]
8
+ "outputs" : [" .nuxt/**" , " !.nuxt/cache/**" ],
9
+ "dotEnv" : [" .env" ]
8
10
},
9
11
"build-storybook" : {
10
12
"dependsOn" : [" ^build-storybook" ],
17
19
"dependsOn" : [" ^lint-fix" ]
18
20
},
19
21
"dev" : {
22
+ "dotEnv" : [" .env" ],
20
23
"cache" : false ,
21
24
"persistent" : true
22
25
}
You can’t perform that action at this time.
0 commit comments