Skip to content

Commit

Permalink
backstage: Build components when building storybook.
Browse files Browse the repository at this point in the history
o3-storybook is failing to deploy to chromatic
https://github.com/Financial-Times/origami/actions/runs/8557812028/job/23450955531

```
Error: Can't resolve '@financial-times/o3-foundation/css/internal.css' in '/home/runner/work/origami/origami/components/o3-tooltip/src/css/brands'
```

I think this is because we're using a mono-repo, and dependencies are
resolved locally. However components have a build step, and the built
files aren't commited. So we need to build them.
  • Loading branch information
notlee committed Apr 5, 2024
1 parent 72f6528 commit bef8440
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 39 deletions.
2 changes: 1 addition & 1 deletion apps/for-everyone-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "./scripts/build-o3-deps.sh && astro build",
"build": "../../scripts/build-o3-deps.sh && astro build",
"preview": "astro preview",
"astro": "astro"
},
Expand Down
76 changes: 38 additions & 38 deletions apps/o3-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"name": "o3-storybook",
"version": "0.0.1",
"description": "Storybook for o3 components",
"main": "index.js",
"scripts": {
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"chromatic": "chromatic"
},
"private": true,
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/preset-env": "^7.22.15",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@storybook/addon-designs": "^7.0.5",
"@storybook/addon-essentials": "^7.4.0",
"@storybook/addon-interactions": "^7.4.0",
"@storybook/addon-links": "^7.4.0",
"@storybook/addon-styling-webpack": "^0.0.4",
"@storybook/blocks": "^7.4.0",
"@storybook/preview-api": "^7.4.0",
"@storybook/react": "^7.4.0",
"@storybook/react-webpack5": "^7.4.0",
"@storybook/testing-library": "^0.2.0",
"@whitespace/storybook-addon-html": "^5.1.6",
"autoprefixer": "^10.4.15",
"chromatic": "^7.1.0",
"css-loader": "^6.8.1",
"postcss": "^8.4.29",
"postcss-loader": "^7.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^7.4.0",
"style-loader": "^3.3.3",
"typescript": "^5.2.2"
}
"name": "o3-storybook",
"version": "0.0.1",
"description": "Storybook for o3 components",
"main": "index.js",
"scripts": {
"storybook": "storybook dev -p 6006",
"build-storybook": "../../scripts/build-o3-deps.sh && storybook build",
"chromatic": "chromatic"
},
"private": true,
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/preset-env": "^7.22.15",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@storybook/addon-designs": "^7.0.5",
"@storybook/addon-essentials": "^7.4.0",
"@storybook/addon-interactions": "^7.4.0",
"@storybook/addon-links": "^7.4.0",
"@storybook/addon-styling-webpack": "^0.0.4",
"@storybook/blocks": "^7.4.0",
"@storybook/preview-api": "^7.4.0",
"@storybook/react": "^7.4.0",
"@storybook/react-webpack5": "^7.4.0",
"@storybook/testing-library": "^0.2.0",
"@whitespace/storybook-addon-html": "^5.1.6",
"autoprefixer": "^10.4.15",
"chromatic": "^7.1.0",
"css-loader": "^6.8.1",
"postcss": "^8.4.29",
"postcss-loader": "^7.3.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "^7.4.0",
"style-loader": "^3.3.3",
"typescript": "^5.2.2"
}
}
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.

0 comments on commit bef8440

Please sign in to comment.