Skip to content

Commit f87903b

Browse files
authored
Remove storybook (#467)
* Remove storybook * Delete all stories files and references to stories in config files Fixes #459
1 parent 95138fd commit f87903b

Some content is hidden

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

63 files changed

+7631
-52260
lines changed

babel.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module.exports = api => {
66
ignore: [
77
!isTest ? /\.test.(tsx?|jsx?)$/ : false,
88
!isTest ? '**/__mocks__/*' : false,
9-
/\.stories.(tsx?|jsx?|mdx?)$/,
109
'**/*.scss',
1110
].filter(Boolean),
1211
};

examples/component-template/.storybook/main.js

-10
This file was deleted.

examples/component-template/.storybook/preview.js

-10
This file was deleted.

examples/component-template/README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @deephaven/component-template
22

3-
This is an example which is setup to build components using Typescript, React, and Sass with Jest for testing and Storybook for isolated component development. Plain Javascript is also allowed, but for new components Typescript is preferred.
3+
This is an example which is setup to build components using Typescript, React, and Sass with Jest for testing. Plain Javascript is also allowed, but for new components Typescript is preferred.
44

55
## Usage
66

@@ -29,7 +29,7 @@ The build step will transpile TS to JS (using Babel), compile Sass to CSS (using
2929

3030
All JS/TS/JSX/TSX files you want in the output MUST be in `./src` since it is set as the `rootDir` in `tsconfig.json`
3131

32-
If you need another type of file copied, you will need to add it to the build process (Babel can be used with `--copy-files --no-copy-ignored` which should work since it ignores all the test/sass/storybook files)
32+
If you need another type of file copied, you will need to add it to the build process (Babel can be used with `--copy-files --no-copy-ignored` which should work since it ignores all the test/sass files)
3333

3434
If for some reason you need to build somewhere that isn't `dist`, you must update `tsconfig.json` and `package.json` to replace everywhere that `dist` is used with whatever you decide to build with.
3535

@@ -49,12 +49,6 @@ ESLint, Prettier, and Stylelint configs are all set at the root level of the web
4949

5050
You can add an `.eslintignore` file if needed.
5151

52-
## Storybook
53-
54-
You can use [Storybook](https://storybook.js.org/) to isolate your component for development. Just use `npm run storybook` to start a Storybook server for this component.
55-
56-
Storybook is setup with a default config in this template. Any `.stories.(jsx?|tsx?|mdx)` file should be picked up by Storybook and ignored by the build process.
57-
5852
## Best Practices
5953

6054
### Removing Unused Dependencies

examples/component-template/package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
"watch:babel": "npm run babel -- -w --skip-initial-build",
2626
"watch:sass": "npm run sass -- --watch --update",
2727
"prestart": "npm run build-dev",
28-
"start": "cross-env NODE_ENV=development npm run watch",
29-
"storybook": "start-storybook -p 6006",
30-
"build-storybook": "build-storybook"
28+
"start": "cross-env NODE_ENV=development npm run watch"
3129
},
3230
"dependencies": {
3331
"prop-types": "^15.7.2"
@@ -39,10 +37,6 @@
3937
"devDependencies": {
4038
"@babel/cli": "^7.16.0",
4139
"@deephaven/tsconfig": "^0.3.1",
42-
"@storybook/addon-actions": "^6.2.3",
43-
"@storybook/addon-essentials": "^6.2.3",
44-
"@storybook/addon-links": "^6.2.3",
45-
"@storybook/react": "^6.2.3",
4640
"@testing-library/react": "^11.2.7",
4741
"@types/jest": "^26.0.23",
4842
"@types/react": "^17.0.2",

examples/component-template/tsconfig.json

+5-15
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,13 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"rootDir": "src/",
5-
"outDir": "dist/",
5+
"outDir": "dist/"
66
},
7-
"include": [
8-
"src/**/*.ts",
9-
"src/**/*.tsx",
10-
"src/**/*.js",
11-
"src/**/*.jsx",
12-
],
13-
"exclude": [
14-
"node_modules",
15-
"src/**/*.test.*",
16-
"src/**/*.stories.*",
17-
"src/**/__mocks__/*"
18-
],
7+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"],
8+
"exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"],
199
"references": [
2010
{
2111
"path": "../log"
22-
},
12+
}
2313
]
24-
}
14+
}

packages/chart/package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/chart/tsconfig.json

+4-14
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,10 @@
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
44
"rootDir": "src/",
5-
"outDir": "dist/",
5+
"outDir": "dist/"
66
},
7-
"include": [
8-
"src/**/*.ts",
9-
"src/**/*.tsx",
10-
"src/**/*.js",
11-
"src/**/*.jsx",
12-
],
13-
"exclude": [
14-
"node_modules",
15-
"src/**/*.test.*",
16-
"src/**/*.stories.*",
17-
"src/**/__mocks__/*"
18-
],
7+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"],
8+
"exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"],
199
"references": [
2010
{
2111
"path": "../iris-grid"
@@ -27,4 +17,4 @@
2717
"path": "../log"
2818
}
2919
]
30-
}
20+
}

packages/code-studio/.storybook/main.js

-11
This file was deleted.

packages/code-studio/.storybook/manager.js

-5
This file was deleted.

packages/code-studio/.storybook/preview-head.html

-9
This file was deleted.

packages/code-studio/.storybook/preview.js

-30
This file was deleted.

packages/code-studio/README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ When new functions are added to the API, ideally stubs returning a generic succe
7777

7878
## Styleguide/Component Development
7979

80-
The styleguide uses [Storybook](https://storybook.js.org/) and can be accessed using `npm run storybook`. This runs independently of the dev server. Storybook can be used to develop components in isolation. The styleguide displays many common components and how to use them. When creating a new component, it should be added to the styleguide to show usage using a `component.stories.jsx` file.
81-
82-
### Legacy Style Guide
83-
84-
When running in development mode (`npm run start`), a style guide is served up at http://localhost:4000/styleguide. This is for legacy purposes now while everything is ported over to Storybook. Do NOT add new components to this styleguide, only use it for reference if things are missing in Storybook.
80+
When running in development mode (`npm run start`), a style guide is served up at http://localhost:4000/styleguide. Styleguide can be used to develop components. The styleguide displays many common components and how to use them. When creating a new component, it should be added to the [styleguide](./src/styleguide/).
8581

8682
## Architecture
8783

0 commit comments

Comments
 (0)