Skip to content

Commit 0612819

Browse files
authored
feat(code-connect): add web component code connect config setup (#8387)
* feat(code-connect): setup web component config * fix: use correct path for working-directory
1 parent 553d1fd commit 0612819

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

.github/workflows/code-connect.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: Figma Code Connect, publish
1+
name: Figma Code Connect, publish both React and Web component configs
22

33
on:
44
push:
5-
paths:
6-
- src/packages/ibm-products/**/*.figma.tsx
75
branches:
86
- main
97

108
jobs:
119
code-connect:
12-
name: Code Connect
10+
name: Code Connect - ${{ matrix.package }}
1311
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
package:
15+
- ibm-products
16+
- ibm-products-web-components
1417
steps:
1518
- name: Checkout
1619
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -27,7 +30,7 @@ jobs:
2730
- name: Install
2831
run: yarn
2932
- name: Run publish
30-
working-directory: packages/ibm-products
33+
working-directory: packages/${{ matrix.package }}
3134
run: npx figma connect publish
3235
env:
3336
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"codeConnect": {
3+
"parser": "html",
4+
"include": ["src/**"],
5+
"interactiveSetupFigmaFileUrl": "https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?m=auto&node-id=4395-242870&t=yYYqoolgX9f4bm4c-1",
6+
"importPaths": {
7+
"packages/ibm-products-web-components/src/*": "@carbon/ibm-products-web-components"
8+
}
9+
}
10+
}

figma.config.json renamed to packages/ibm-products/figma.config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"codeConnect": {
3-
"include": ["packages/ibm-products/src/**/*.{tsx,jsx}"],
3+
"parser": "react",
4+
"importPaths": {
5+
"packages/ibm-products/src/*": "@carbon/ibm-products"
6+
},
7+
"include": ["src/**"],
48
"label": "React",
59
"interactiveSetupFigmaFileUrl": "https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?m=auto&node-id=4395-242870&t=yYYqoolgX9f4bm4c-1"
610
}

0 commit comments

Comments
 (0)