Skip to content
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

migrate frontend to docusaurus #9014

Merged
merged 38 commits into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
34bdb6d
delete loads of really important stuff that we definitely need
chris48s Mar 19, 2023
b293065
v basic MVP smoosh docusaurus PoC into repo
chris48s Mar 20, 2023
20aea04
TODO
chris48s Mar 20, 2023
e6f9b0d
delete more really important stuff
chris48s Mar 20, 2023
1cc9572
TODO
chris48s Mar 20, 2023
b8cb4d8
tidyup: use run-s
chris48s Mar 20, 2023
abf4bd4
don't redirect images used in frontend to raster proxy
chris48s Mar 20, 2023
87f5b97
fix routing
chris48s Mar 20, 2023
d27370f
preserve the /endpoint link
chris48s Mar 20, 2023
2d5fd7f
delete the blog (for now)
chris48s Mar 20, 2023
ece6472
content edits
chris48s Mar 20, 2023
77b0343
appease the lint gods
chris48s Mar 20, 2023
235d2b0
update danger rules
chris48s Mar 20, 2023
1ecf949
remove placeholder
chris48s Mar 20, 2023
956d617
cypress tests
chris48s Mar 23, 2023
ef74cbb
dockerhub --> ghcr
chris48s Mar 23, 2023
3fe9470
Revert "dockerhub --> ghcr"
chris48s Mar 26, 2023
65881f1
Merge branch 'master' into gatsby-docusaurus
chris48s Apr 11, 2023
e0004d5
downgrade lockfile format
chris48s Apr 11, 2023
d659e91
implement defs/BASE_URL
chris48s Apr 11, 2023
c99fdb2
fix e2e build
chris48s Apr 11, 2023
b38bd85
actually fix cypress tests
chris48s Apr 12, 2023
df46828
always run cypress tests on build
chris48s Apr 12, 2023
f1243e3
this never worked
chris48s Apr 12, 2023
19a2080
add command for docusaurus:clear
chris48s Apr 12, 2023
2931df6
delete more code we don't need any more
chris48s Apr 12, 2023
2e2ee69
update ESLint/prettier config
chris48s Apr 12, 2023
3adb7bd
delete unsused exports
chris48s Apr 13, 2023
1cd61cd
documentation updates
chris48s Apr 13, 2023
424c411
delete a fairly large chunk of our dependency tree
chris48s Apr 13, 2023
25aab60
Merge branch 'master' into gatsby-docusaurus
chris48s Apr 15, 2023
fbf50a9
allow base_url as build arg to Dockerfile
chris48s Apr 15, 2023
bd43d07
fixup dockerfile
chris48s Apr 15, 2023
c4288f6
work out base url at runtime if not set
chris48s Apr 15, 2023
2accfd2
remove gatsby monorepo from closebot
chris48s Apr 16, 2023
b2ff593
rename HomepageFeatures to homepage-features
chris48s Jun 10, 2023
ab3785b
Merge branch 'master' into gatsby-docusaurus
chris48s Jun 10, 2023
5d6ff7e
Merge branch 'master' into gatsby-docusaurus
chris48s Jun 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 14 additions & 33 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ extends:
- standard
- standard-jsx
- standard-react
- plugin:@typescript-eslint/recommended
- prettier
- eslint:recommended

Expand All @@ -18,7 +17,7 @@ settings:
react:
version: '16.8'
jsdoc:
mode: jsdoc
mode: typescript

plugins:
- chai-friendly
Expand All @@ -37,39 +36,33 @@ overrides:
# rules listed here are only ones which conflict.

- files:
- '**/*.js'
- '!frontend/**/*.js'
- 'badge-maker/**/*.js'
- '**/*.cjs'
env:
node: true
es6: true
rules:
no-console: 'off'
'@typescript-eslint/explicit-module-boundary-types': 'off'

- files:
- '**/*.@(ts|tsx)'
- '**/*.js'
- '!frontend/**/*.js'
- '!badge-maker/**/*.js'
env:
node: true
es6: true
parserOptions:
sourceType: 'module'
parser: '@typescript-eslint/parser'
rules:
# Argh.
'@typescript-eslint/explicit-function-return-type':
['error', { 'allowExpressions': true }]
'@typescript-eslint/no-empty-function': 'error'
'@typescript-eslint/no-var-requires': 'error'
'@typescript-eslint/no-object-literal-type-assertion': 'off'
'@typescript-eslint/no-explicit-any': 'error'
'@typescript-eslint/ban-ts-ignore': 'off'
'@typescript-eslint/explicit-module-boundary-types': 'off'
no-console: 'off'

- files:
- core/**/*.ts
- '**/*.ts'
parserOptions:
sourceType: 'module'
parser: '@typescript-eslint/parser'

- files:
- gatsby-browser.js
- 'frontend/**/*.@(js|ts|tsx)'
- 'frontend/**/*.js'
parserOptions:
sourceType: 'module'
env:
Expand Down Expand Up @@ -128,14 +121,6 @@ rules:
# Disable some rules from eslint:recommended.
no-empty: ['error', { 'allowEmptyCatch': true }]

# Allow unused parameters. In callbacks, removing them seems to obscure
# what the functions are doing.
'@typescript-eslint/no-unused-vars': ['error', { 'args': 'none' }]
no-unused-vars: 'off'

'@typescript-eslint/no-var-requires': 'off'

'@typescript-eslint/no-use-before-define': 'error'
no-use-before-define: 'off'

# These should be disabled by eslint-config-prettier, but are not.
Expand Down Expand Up @@ -197,11 +182,7 @@ rules:
jsdoc/require-returns-type: 'error'
jsdoc/valid-types: 'error'

# Disable some from TypeScript.
'@typescript-eslint/camelcase': off
'@typescript-eslint/explicit-function-return-type': 'off'
'@typescript-eslint/no-empty-function': 'off'

react/prop-types: 'off'
react/jsx-sort-props: 'error'
react-hooks/rules-of-hooks: 'error'
react-hooks/exhaustive-deps: 'error'
Expand Down
1 change: 0 additions & 1 deletion .github/actions/close-bot/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function allChangelogLinesAreVersionBump(changelogLines) {

function isPointlessVersionBump(body) {
const pointlessBumpLinks = [
'https://github.com/gatsbyjs/gatsby',
'https://github.com/typescript-eslint/typescript-eslint',
]

Expand Down
31 changes: 0 additions & 31 deletions .github/actions/frontend-tests/action.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ jobs:
node-version: 16
cypress: true

- name: Frontend build
run: GATSBY_BASE_URL=http://localhost:8080 npm run build

- name: Run tests
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: npm run e2e-on-build
run: npm run e2e

- name: Archive videos
if: always()
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/test-frontend.yml

This file was deleted.

14 changes: 5 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ typings/

# Temporary build artifacts.
/build
.next
badge-examples.json
supported-features.json
service-definitions.yml
frontend/categories/*.yaml

# Local runtime configuration.
Expand All @@ -104,11 +100,6 @@ frontend/categories/*.yaml
# Template for the local runtime configuration.
!/config/local*.template.yml

# Gatsby
/frontend/.cache
/frontend/public
/public
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you already have a checkout of shields, these removed paths will become unstaged files in your checkout after pulling this. Other than "just live with it", is there any good pattern for dealing with this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not that i know of. it's something i've experienced occasionally in a few projects, and always just dealt with via local cleanups (either via git or just standard file system management tooling).

i do not think this is worth the effort, especially given our current quantity of regular contributors, but the only potential automated/assistive route i can think of would be seeing if there's any git client hooks (post-merge maybe?) we could hook into (pun very much intended) that would deal with any such known files/directories for our project


# Cypress
/cypress/videos/
/cypress/screenshots/
Expand All @@ -121,3 +112,8 @@ flamegraph.html

# config file for node-pg-migrate
migrations-config.json

# Frontend/Docusaurus
frontend/.docusaurus
frontend/.cache-loader
/public
5 changes: 0 additions & 5 deletions .mocharc-frontend.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .nycrc-frontend.json

This file was deleted.

4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ public
private/*.json
/.nyc_output
analytics.json
supported-features.json
service-definitions.yml
frontend/.docusaurus
frontend/categories
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ You can read a [tutorial on how to add a badge][tutorial].

When server source files change, the badge server should automatically restart
itself (using [nodemon][]). When the frontend files change, the frontend dev
server (`gatsby dev`) should also automatically reload. However the badge
server (`docusaurus start`) should also automatically reload. However the badge
definitions are built only before the server first starts. To regenerate those,
either run `npm run defs` or manually restart the server.
Comment on lines +110 to 112
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on what we decide when it comes to #9014 (comment) we might need to update this and also https://github.com/badges/shields/blob/master/doc/TUTORIAL.md?plain=1#L305


Expand Down
94 changes: 0 additions & 94 deletions core/badge-urls/make-badge-url.d.ts

This file was deleted.

Loading