Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 64cc34a

Browse files
authored
refactor(storybook): completely remove storybook (#2636)
1 parent 057e6d0 commit 64cc34a

24 files changed

Lines changed: 23 additions & 821 deletions

.eslintrc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
module.exports = {
2-
extends: [
3-
'airbnb',
4-
'plugin:prettier/recommended',
5-
'plugin:storybook/recommended',
6-
],
2+
extends: ['airbnb', 'plugin:prettier/recommended'],
73
env: {
84
browser: true,
95
node: true,

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please follow this check list to ensure that you've followed all items before op
1313
- [ ] I have run `npm run lint:js -- --fix` and/or `npm run lint:md -- --fix` for my JavaScript and/or Markdown changes.
1414
- This is important as most of the cases your code changes might not be correctly linted
1515
- [ ] I have run `npm run test` to check if all tests are passing, and/or `npm run test -- -u` to update snapshots if I created and/or updated React Components.
16-
- [ ] I have checked that the build works locally and that `npm run build` and `npm run build-storybook` work fine.
16+
- [ ] I have checked that the build works locally and that `npm run build` work fine.
1717
- [ ] I've covered new added functionality with unit tests if necessary.
1818

1919
## Description

.github/workflows/gatsby.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@ jobs:
2020

2121
- name: Run Gatsby Build
2222
run: npm run build-ci
23-
24-
- name: Run Storybook Build
25-
run: npm run build-storybook

.github/workflows/generate-preview.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ jobs:
4747
env:
4848
PATH_PREFIX: ${{ github.event.pull_request.number }}/
4949

50-
- name: Run Storybook Build
51-
run: npm run build-storybook
52-
env:
53-
PATH_PREFIX: ${{ github.event.pull_request.number }}/
54-
5550
- name: Upload to GCS
5651
run: gsutil -m rsync -R public gs://staging.nodejs.dev/${{ github.event.pull_request.number }}/
5752

.storybook/main.js

Lines changed: 0 additions & 102 deletions
This file was deleted.

.storybook/preview.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,6 @@ In the case of an objection being raised in a pull request by another collaborat
9494
* Pull Request must remain open for 72 hours without any objections
9595
* Once the requirements are met and approved, the pull request can be merged and a member of @nodejs/community-committee will add the new member to the [@nodejs/nodejs-dev team](https://github.com/orgs/nodejs/teams/nodejs-dev)
9696

97-
## 📕 Storybook
98-
99-
This project uses [Storybook][], a tool which provides a sandbox environment for developing UI components. To generate the Storybook locally:
100-
101-
* Run `npm run storybook`
102-
* Navigate to `localhost:6006`
103-
104-
The production Storybook can be viewed at <https://nodejs.dev/storybook>
10597

10698
## 🐛 Debugging Failing Checks
10799

@@ -135,7 +127,6 @@ By making a contribution to this project, I certify that:
135127
including my sign-off) is maintained indefinitely and may be redistributed consistent
136128
with this project or the open source license(s) involved.
137129

138-
[Storybook]: https://storybook.js.org/
139130
[`squash`]: https://help.github.com/en/articles/about-pull-request-merges#squash-and-merge-your-pull-request-commits
140131
[conventional commits]: https://www.conventionalcommits.org/
141132
[nodejs.dev repo]: https://github.com/nodejs/nodejs.dev

cloudbuild-deploy.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ steps:
1919
- name: 'node:16'
2020
entrypoint: npm
2121
args: ['run', 'build']
22-
- name: 'node:16'
23-
entrypoint: npm
24-
args: ['run', 'build-storybook']
2522
- name: 'gcr.io/$PROJECT_ID/firebase'
2623
args: ['deploy', '--project', '$PROJECT_ID', '--only', 'hosting']
2724
timeout: 900s

docs/project-overview.md

Lines changed: 20 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,81 +4,24 @@
44

55
A quick look at some of the top-level files and directories found in this project.
66

7-
```console
8-
.
9-
├── .github
10-
├── .storybook
11-
├── meetings
12-
├── node_modules
13-
├── src
14-
├── stories
15-
├── style-guide
16-
├── test
17-
├── util-node
18-
├── .editorconfig
19-
├── .eslintignore
20-
├── .eslintrc.js
21-
├── .firebaserc
22-
├── .gitignore
23-
├── .nvmrc
24-
├── .prettierignore
25-
├── .prettierrc
26-
├── .remarkrc
27-
├── cloudbuild-deploy.yaml
28-
├── CODE_OF_CONDUCT.md
29-
├── CONTRIBUTING.md
30-
├── empty.env
31-
├── firebase.json
32-
├── gatsby-browser.js
33-
├── gatsby-config.js
34-
├── gatsby-node.js
35-
├── LICENSE
36-
├── ModerationPolicy.md
37-
├── OKR.md
38-
├── package-lock.json
39-
├── package.json
40-
├── README.md
41-
├── test-preprocessor.js
42-
├── test-setup.js
43-
└── tsconfig.json
44-
45-
```
46-
47-
1. **`.storybook`**: This directory contains configuration files so the [storybook](https://storybook.js.org/) package works as it should. Storybook is used to build the individual UI components in this project.
48-
49-
2. **`/node_modules`**: The directory where all of the modules of code that your project depends on (npm packages) are automatically installed.
50-
51-
3. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser), like your site header, or a page template. "Src" is a convention for "source code."
52-
53-
4. **`/stories`**: This directory contains stories for UI components used in this project. You can find out what a story is [here](https://storybook.js.org/docs/react/get-started/whats-a-story). Also, you can run them locally using `npm run storybook`. Our public story link can be found [here](https://nodejs.dev/storybook).
54-
55-
5. **`/test`**: Tests for this projects are stored in this directory. This project uses [Jest](https://jestjs.io/) as it's testing framework.
56-
57-
6. **`/util-node`**: Custom utility functions that require nodeJs to run can be stored in files inside this directory. An example is the create-slug function in the createSlug.js file that generates unique slugs for articles.
58-
59-
7. **`.gitignore`**: This file tells git which files it should not track/not maintain a version history.
60-
61-
8. **`.nvmrc`**: nvm configuration so packages work as they should
62-
63-
9. **`.prettierrc`**: This is a configuration file for a tool called [Prettier](https://prettier.io/), which is a tool to help keep the formatting of your code consistent.
64-
65-
10. **`empty.env`**: Rename to **`.env`** and set your Contentful API key
66-
67-
11. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
68-
69-
12. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you'd like to include, etc. (Check out the [config docs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/) for more detail).
70-
71-
13. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby node APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
72-
73-
14. **`LICENSE`**: Gatsby is licensed under the MIT license.
74-
75-
15. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won't change this file directly).
76-
77-
16. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project's name, author, etc.). This manifest is how npm knows which packages to install for your project.
78-
79-
17. **`README.md`**: A text file containing useful reference information about your project.
80-
81-
18. **`tsconfig.json`**: Config file for TypeScript
7+
1. **`/node_modules`**: The directory where all of the modules of code that your project depends on (npm packages) are automatically installed.
8+
1. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser), like your site header, or a page template. "Src" is a convention for "source code."
9+
1. **`/content`**: This directory contains all the contents of (pages, blog posts, doc pages) of the website. They're all done in Markdown and MDX.
10+
1. **`/test`**: Tests for this projects are stored in this directory. This project uses [Jest](https://jestjs.io/) as it's testing framework.
11+
1. **`/util-node`**: Custom utility functions that require nodeJs to run can be stored in files inside this directory. An example is the create-slug function in the createSlug.js file that generates unique slugs for articles.
12+
1. **`.gitignore`**: This file tells git which files it should not track/not maintain a version history.
13+
1. **`.nvmrc`**: nvm configuration so packages work as they should
14+
1. **`.prettierrc`**: This is a configuration file for a tool called [Prettier](https://prettier.io/), which is a tool to help keep the formatting of your code consistent.
15+
1. **`empty.env`**: Rename to **`.env`** and set your Contentful API key
16+
1. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
17+
1. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you'd like to include, etc. (Check out the [config docs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/) for more detail).
18+
1. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby node APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
19+
1. **`LICENSE`**: Gatsby is licensed under the MIT license.
20+
1. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won't change this file directly)
21+
1. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project's name, author, etc.). This manifest is how npm knows which packages to install for your project.
22+
1. **`README.md`**: A text file containing useful reference information about your project.
23+
1. **`TRANSLATING.md`**: A text file containing useful reference about how to contribute with translations.
24+
1. **`tsconfig.json`**: Config file for TypeScript
8225

8326
## 📝 Data Sources
8427

@@ -92,6 +35,5 @@ The content folder is responsible for aggregating all the content of the Website
9235

9336
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start:
9437

95-
* **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/docs/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
96-
97-
* **To dive straight into code samples head [to our documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the "Guides", API reference, and "Advanced Tutorials" sections in the sidebar.
38+
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/docs/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
39+
- **To dive straight into code samples head [to our documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the "Guides", API reference, and "Advanced Tutorials" sections in the sidebar.

package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,13 @@
8282
"lint:scss": "stylelint --config ./.stylelintrc.json \"./src/**/*.{css,sass,scss}\"",
8383
"lint:fix": "npm run lint -- --fix",
8484
"serve": "npm run build && clear && gatsby serve",
85-
"storybook": "storybook dev -p 6006",
86-
"build-storybook": "storybook build -o ./public/storybook",
8785
"a11y": "./node_modules/pa11y/bin/pa11y.js localhost:8000",
8886
"type-check": "tsc --noEmit",
8987
"postinstall": "patch-package"
9088
},
9189
"devDependencies": {
9290
"@babel/core": "^7.18.10",
9391
"@babel/preset-typescript": "^7.18.6",
94-
"@storybook/addon-actions": "~7.0.0-alpha.18",
95-
"@storybook/addon-links": "~7.0.0-alpha.18",
96-
"@storybook/addons": "~7.0.0-alpha.18",
97-
"@storybook/builder-webpack5": "~7.0.0-alpha.18",
98-
"@storybook/manager-webpack5": "~7.0.0-alpha.10",
99-
"@storybook/react": "~7.0.0-alpha.18",
100-
"@storybook/react-webpack5": "^7.0.0-alpha.0",
10192
"@testing-library/dom": "^8.16.0",
10293
"@testing-library/jest-dom": "^5.16.4",
10394
"@testing-library/react": "^13.3.0",
@@ -128,7 +119,6 @@
128119
"eslint-plugin-prettier": "^4.2.1",
129120
"eslint-plugin-react": "^7.30.1",
130121
"eslint-plugin-react-hooks": "^4.6.0",
131-
"eslint-plugin-storybook": "^0.6.2",
132122
"eslint-plugin-testing-library": "^5.6.0",
133123
"identity-obj-proxy": "^3.0.0",
134124
"jest": "^28.1.3",
@@ -142,8 +132,6 @@
142132
"remark-preset-lint-node": "^3.3.1",
143133
"sass": "^1.54.1",
144134
"sass-loader": "^13.0.2",
145-
"storybook": "future",
146-
"storybook-addon-gatsby": "^0.0.5",
147135
"stylelint": "^14.9.1",
148136
"stylelint-config-prettier": "^9.0.3",
149137
"stylelint-config-recommended-scss": "^7.0.0",

0 commit comments

Comments
 (0)