Skip to content

Commit 0cadf7c

Browse files
chore: move products storybook config from core to products (#7415) (#7505)
* chore: move products storybook config from core to products * fix: update core to products in ci scripts * fix: add public * fix: storybook import paths * fix: add internal extension to internal stories * fix: simpleheader path * fix: path * fix: ci * fix: exclude internal from percy
1 parent 3de1ea2 commit 0cadf7c

File tree

68 files changed

+90
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+90
-92
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
- name: Run storybook
173173
id: storybook
174174
run: |
175-
npx serve -l 3000 packages/core/storybook-static &
175+
npx serve -l 3000 packages/ibm-products/storybook-static &
176176
pid=$!
177177
echo "pid=$pid" >> $GITHUB_OUTPUT
178178
- uses: ./actions/wait-for-it
@@ -215,7 +215,7 @@ jobs:
215215
${{ env.PERCY_TOKEN != '' && github.repository ==
216216
'carbon-design-system/ibm-products' && github.event.pull_request.draft
217217
== false }}
218-
working-directory: packages/core
218+
working-directory: packages/ibm-products
219219
run: yarn percy storybook storybook-static
220220

221221
avt:

.github/workflows/deploy-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
- name: Deploy to latest
3535
run: |
3636
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
37-
npx gh-pages -d packages/core/storybook-static -u "github-actions-bot <[email protected]>" --dest latest --message "chore(deploy): deploy to gh-pages latest"
37+
npx gh-pages -d packages/ibm-products/storybook-static -u "github-actions-bot <[email protected]>" --dest latest --message "chore(deploy): deploy to gh-pages latest"
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
- name: Deploy
3434
run: |
3535
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
36-
npx gh-pages -d packages/core/storybook-static -u "github-actions-bot <[email protected]>" --dest staging --message "chore(deploy): deploy to gh-pages staging"
36+
npx gh-pages -d packages/ibm-products/storybook-static -u "github-actions-bot <[email protected]>" --dest staging --message "chore(deploy): deploy to gh-pages staging"
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.percy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ discovery:
1010
storybook:
1111
include: ['/IBM Products/']
1212
exclude: [
13+
'/Internal/',
1314
'/Datagrid/*',
1415
'/DataSpreadsheet/',
1516
'Cascade: With Grid',

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"scripts": {
1717
"audit": "node scripts/audit.js '--environment production' moderate",
1818
"avt": "AVT=true yarn playwright test --project chromium --grep @avt",
19-
"build": "run-s -s 'build:*' storybook:build:storybook",
19+
"build": "run-s -s 'build:*' storybook:build",
2020
"build:packages": "yarn run-all --include-dependencies build",
2121
"ci-check": "run-s -s 'ci-check:*' storybook:build",
2222
"ci-check:build": "run-s -s 'build:*' 'run-all --no-sort ci-check'",
@@ -53,10 +53,8 @@
5353
"test:c4p-styles": "lerna run --stream --scope @carbon/ibm-products-styles test --",
5454
"test:c4p-wc": "yarn playwright install && lerna run --stream --scope @carbon/ibm-products-web-components test --",
5555
"spellcheck": "cspell '**' -e './examples' --gitignore --quiet --no-must-find-files",
56-
"storybook": "yarn storybook:start",
57-
"storybook:build": "run-s -s 'storybook:build:*'",
58-
"storybook:build:storybook": "cd packages/core && yarn build",
59-
"storybook:start": "cd packages/core && yarn start",
56+
"storybook": "cd packages/ibm-products && yarn storybook:start",
57+
"storybook:build": "cd packages/ibm-products && yarn storybook:build",
6058
"storybook-wc": "cd packages/ibm-products-web-components && yarn storybook",
6159
"storybook-wc:build": "cd packages/ibm-products-web-components && run-s build build:storybook",
6260
"sync": "carbon-cli sync",
@@ -67,7 +65,7 @@
6765
"upgrade:dependencies:examples": "npm-check-updates -u --dep dev,peer,prod --color --target minor --packageFile 'scripts/example-gallery-builder/update-example/**/package.json'",
6866
"upgrade:automatic": "run-s -s 'upgrade:dependencies:*'",
6967
"upgrade:carbon": "npm-check-updates -u --dep dev,peer,prod --packageFile '{package.json,{config/**,packages/**}/package.json}' --filter '/carbon/' --target minor",
70-
"visual-snapshot": "cd packages/core && yarn percy storybook storybook-static",
68+
"visual-snapshot": "cd packages/ibm-products && yarn percy storybook storybook-static",
7169
"wc-coverage": "cd packages/ibm-products-web-components && yarn coverage"
7270
},
7371
"devDependencies": {

packages/core/package.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@
1818
"carbon for ibm products"
1919
],
2020
"scripts": {
21-
"build": "run-s build:carbon build:storybook",
22-
"build:carbon": "sass -q --quiet-deps --style=expanded --load-path ../ibm-products/node_modules --load-path ../../node_modules --load-path node_modules .storybook/carbon.scss:css/carbon.css",
23-
"build:storybook": "yarn dlx cross-env \"NODE_OPTIONS=--max_old_space_size=8192\" && storybook build --quiet",
2421
"clean": "yarn dlx rimraf storybook-static css",
25-
"start": "run-s build:carbon start:storybook",
26-
"start:storybook": "storybook dev ./public -p 3000",
2722
"//upgrade-dependencies": "# don't upgrade carbon (done globally), react/react-dom (issue #1595)",
2823
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$)/'"
2924
},
@@ -35,24 +30,6 @@
3530
"@carbon/react": "^1.81.0",
3631
"@carbon/themes": "^11.50.0",
3732
"@carbon/type": "^11.38.0",
38-
"@percy/cli": "^1.30.7",
39-
"@percy/storybook": "^6.0.3",
40-
"@storybook/addon-a11y": "^8.6.12",
41-
"@storybook/addon-actions": "^8.6.12",
42-
"@storybook/addon-controls": "^8.6.12",
43-
"@storybook/addon-docs": "^8.6.12",
44-
"@storybook/addon-essentials": "^8.6.12",
45-
"@storybook/addon-links": "^8.6.12",
46-
"@storybook/addon-storysource": "^8.6.12",
47-
"@storybook/addon-viewport": "^8.6.12",
48-
"@storybook/components": "^8.6.12",
49-
"@storybook/core-events": "^8.6.12",
50-
"@storybook/csf": "^0.1.13",
51-
"@storybook/manager-api": "^8.6.12",
52-
"@storybook/react": "^8.6.12",
53-
"@storybook/react-vite": "^8.6.12",
54-
"@storybook/source-loader": "^8.6.12",
55-
"@storybook/theming": "^8.6.12",
5633
"fast-glob": "^3.3.3",
5734
"npm-check-updates": "^17.1.15",
5835
"npm-run-all": "^4.1.5",
@@ -63,7 +40,6 @@
6340
"remark-gfm": "^4.0.1",
6441
"rimraf": "^6.0.1",
6542
"sass": "^1.85.1",
66-
"storybook": "^8.6.12",
6743
"typescript": "^5.8.2",
6844
"vite": "^6.2.2"
6945
},

packages/core/.storybook/_docs.scss renamed to packages/ibm-products/.storybook/_docs.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// This source code is licensed under the Apache-2.0 license found in the
55
// LICENSE file in the root directory of this source tree.
66
//
7-
87
.storybook__link-to {
98
text-decoration: none;
109
}

0 commit comments

Comments
 (0)