-
Notifications
You must be signed in to change notification settings - Fork 15
chore: update storybook configuration #418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e6d22ce
4945271
ee13527
80248f8
8fac262
77ccd51
d96adcb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# General ignores | ||
.env | ||
demo | ||
node_modules | ||
utils/storybook/coverage | ||
*.log | ||
|
||
# Package specific | ||
packages/**/dist | ||
package-lock.json | ||
|
||
# Demo specific | ||
demo/**/* | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged | ||
yarn lerna run build --since main | ||
yarn lint-staged && yarn build --since HEAD --exclude-dependents && git add packages/**/.size-snapshot.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright Zendesk, Inc. | ||
* | ||
* Use of this source code is governed under the Apache License, Version 2.0 | ||
* found at http://www.apache.org/licenses/LICENSE-2.0. | ||
*/ | ||
|
||
const path = require('path'); | ||
const { readdirSync } = require('fs'); | ||
const { getStorybookBabelConfig } = require('@storybook/core-common'); | ||
|
||
const config = getStorybookBabelConfig(); | ||
|
||
const PACKAGE_NAMES = readdirSync(path.resolve(__dirname, '../packages')).filter( | ||
name => name !== '.template' | ||
); | ||
|
||
module.exports = { | ||
sourceType: 'unambiguous', | ||
presets: [...config.presets], | ||
plugins: [ | ||
...config.plugins, | ||
'babel-plugin-styled-components', | ||
[ | ||
'module-resolver', | ||
{ | ||
root: ['../'], | ||
alias: PACKAGE_NAMES.reduce((previousValue, packageName) => { | ||
previousValue[ | ||
`@zendeskgarden/container-${packageName}` | ||
] = `./packages/${packageName}/src`; | ||
|
||
return previousValue; | ||
}, {}) | ||
} | ||
] | ||
] | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright Zendesk, Inc. | ||
* | ||
* Use of this source code is governed under the Apache License, Version 2.0 | ||
* found at http://www.apache.org/licenses/LICENSE-2.0. | ||
*/ | ||
|
||
const path = require('path'); | ||
const gardenTailwindCss = require('@zendeskgarden/tailwindcss'); | ||
|
||
module.exports = { | ||
content: [`${path.resolve(__dirname, '../packages')}/*/demo/**/*.{mdx,tsx}`], | ||
plugins: [gardenTailwindCss], | ||
safelist: process.env.NODE_ENV === 'development' ? [{ pattern: /.*/u }] : [] | ||
}; |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"lint:md": "markdownlint README.md packages/*/src/**/*.md packages/*/src/*.md packages/*/README.md", | ||
"new": "utils/scripts/new.js", | ||
"prepare": "yarn build", | ||
"start": "start-storybook -p 6006", | ||
"start": "start-storybook --no-version-updates -p 6006", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't find There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's documented with |
||
"start:demo": "yarn build:demo && live-server demo", | ||
"tag": "lerna version --conventional-commits --force-git-tag", | ||
"test": "yarn test:all --watch", | ||
|
@@ -40,7 +40,6 @@ | |
"@storybook/addon-a11y": "6.4.13", | ||
"@storybook/addon-essentials": "6.4.13", | ||
"@storybook/addon-postcss": "2.0.0", | ||
"@storybook/addon-storysource": "6.4.13", | ||
"@storybook/builder-webpack5": "6.4.13", | ||
"@storybook/manager-webpack5": "6.4.13", | ||
"@storybook/react": "6.4.13", | ||
|
@@ -61,10 +60,13 @@ | |
"@zendeskgarden/eslint-config": "27.0.0", | ||
"@zendeskgarden/react-theming": "8.47.2", | ||
"@zendeskgarden/scripts": "1.4.0", | ||
"@zendeskgarden/tailwindcss": "3.0.1", | ||
"acorn-jsx": "5.3.2", | ||
"autoprefixer": "10.4.2", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "27.4.6", | ||
"babel-loader": "8.2.3", | ||
"babel-plugin-module-resolver": "4.1.0", | ||
"babel-plugin-styled-components": "2.0.2", | ||
"commander": "8.3.0", | ||
"core-js": "3.20.3", | ||
|
@@ -87,6 +89,7 @@ | |
"markdownlint-cli": "0.30.0", | ||
"ora": "5.4.1", | ||
"popper.js": "1.16.1", | ||
"postcss": "8.4.6", | ||
"prettier": "2.5.1", | ||
"prettier-package-json": "2.6.0", | ||
"react": "17.0.2", | ||
|
@@ -101,6 +104,7 @@ | |
"rollup-plugin-size-snapshot": "0.12.0", | ||
"rollup-plugin-typescript2": "0.31.1", | ||
"styled-components": "5.3.3", | ||
"tailwindcss": "3.0.19", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was the reason for adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe for styling storybook with some sane defaults: https://github.com/zendeskgarden/react-containers/pull/418/files#diff-2b5e28aefe329b32c6b4fd8923ed58c50ea800a653d78c14f6c26abcd4b6c0fe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Francois-Esquire There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mtomcal if you haven't yet, please see the PR description. |
||
"ts-jest": "27.1.3", | ||
"ts-loader": "8.3.0", | ||
"typescript": "4.5.4", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has there been any changes to add demo folder yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet. TBD per PR description.