Skip to content

Commit f73d5f6

Browse files
authored
Jest Website v2 (#11149)
1 parent fee3c6a commit f73d5f6

File tree

173 files changed

+10857
-19661
lines changed

Some content is hidden

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

173 files changed

+10857
-19661
lines changed

.circleci/config.yml

-16
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,6 @@ jobs:
8383
- store_test_results:
8484
path: reports/junit
8585

86-
test-or-deploy-website:
87-
working_directory: ~/jest
88-
executor: node/default
89-
resource_class: large
90-
steps:
91-
- checkout
92-
- node/install:
93-
lts: true
94-
install-npm: false
95-
- node/install-packages: *install
96-
- run:
97-
name: Test or Deploy Jest Website
98-
command: ./.circleci/website.sh
99-
10086
# Workflows enables us to run multiple jobs in parallel
10187
workflows:
10288
version: 2
@@ -107,5 +93,3 @@ workflows:
10793
- test-node-14
10894
- test-node-15 # current
10995
- test-jest-jasmine
110-
- test-or-deploy-website:
111-
filters: *filter-ignore-gh-pages

.circleci/website.sh

-35
This file was deleted.

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ bin/
44
flow-typed/**
55
packages/*/build/**
66
packages/jest-diff/src/cleanupSemantic.ts
7+
website/.docusaurus
78
website/blog
89
website/build
910
website/node_modules
1011
website/i18n/*.js
11-
website/translated_docs
1212
website/static
1313
!.eslintrc.js

.eslintrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ module.exports = {
152152
'sort-keys': 'off',
153153
},
154154
},
155+
{
156+
files: ['website/**/*'],
157+
rules: {
158+
'import/order': 'off',
159+
'import/sort-keys': 'off',
160+
'sort-keys': 'off',
161+
},
162+
},
155163
{
156164
files: ['examples/**/*'],
157165
rules: {

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
/packages/*/coverage/
2121
/packages/*/node_modules/
2222

23+
/website/.docusaurus
2324
/website/build
2425
/website/backers.json
2526
/website/node_modules
2627
/website/yarn.lock
27-
/website/translated_docs
2828
/website/i18n/*
2929

3030
/benchmarks/*/node_modules/
@@ -48,3 +48,5 @@ package-lock.json
4848
!**/.yarn/sdks
4949
!**/.yarn/versions
5050
**/.pnp.*
51+
52+
crowdin-cli.jar

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ The best way to get your bug fixed is to provide a reduced test case. Please pro
194194

195195
### Docs translation
196196

197-
We get translations from crowdin, see https://crowdin.com/project/jest. Any and all help is very much appreciated!
197+
We get translations from Crowdin, see https://crowdin.com/project/jest-v2. Any and all help is very much appreciated!
198198

199199
### Security Bugs
200200

crowdin.yaml

+45-47
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,48 @@
1-
project_identifier_env: CROWDIN_JEST_PROJECT_ID
2-
api_key_env: CROWDIN_JEST_API_KEY
3-
base_path: './'
1+
#
2+
# Your Crowdin credentials
3+
#
4+
project_id: '428892'
5+
api_token_env: 'CROWDIN_PERSONAL_TOKEN'
6+
7+
base_path: '.'
8+
base_url: 'https://api.crowdin.com'
49
preserve_hierarchy: true
510

11+
# See Yaml anchors: https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
12+
languages_mapping: &languages_mapping
13+
locale:
14+
'es-ES': 'es-ES'
15+
'ja': 'ja'
16+
'pt-BR': 'pt-BR'
17+
'ro': 'ro'
18+
'ru': 'ru'
19+
'uk': 'uk'
20+
'zh-CN': 'zh-Hans'
21+
22+
#
23+
# Files configuration
24+
# see https://support.crowdin.com/configuration-file/
25+
#
626
files:
7-
- source: '/docs/*.md'
8-
translation: '/website/translated_docs/%locale%/%original_file_name%'
9-
languages_mapping: &anchor
10-
locale:
11-
'af': 'af'
12-
'ar': 'ar'
13-
'bs-BA': 'bs-BA'
14-
'ca': 'ca'
15-
'cs': 'cs'
16-
'da': 'da'
17-
'de': 'de'
18-
'el': 'el'
19-
'es-ES': 'es-ES'
20-
'fa': 'fa-IR'
21-
'fi': 'fi'
22-
'fr': 'fr'
23-
'he': 'he'
24-
'hu': 'hu'
25-
'id': 'id-ID'
26-
'it': 'it'
27-
'ja': 'ja'
28-
'ko': 'ko'
29-
'mr': 'mr-IN'
30-
'nl': 'nl'
31-
'no': 'no-NO'
32-
'pl': 'pl'
33-
'pt-BR': 'pt-BR'
34-
'pt-PT': 'pt-PT'
35-
'ro': 'ro'
36-
'ru': 'ru'
37-
'sk': 'sk-SK'
38-
'sr': 'sr'
39-
'sv-SE': 'sv-SE'
40-
'tr': 'tr'
41-
'uk': 'uk'
42-
'vi': 'vi'
43-
'zh-CN': 'zh-Hans'
44-
'zh-TW': 'zh-Hant'
45-
- source: '/website/versioned_docs/**/*.md'
46-
translation: '/website/translated_docs/%locale%/**/%original_file_name%'
47-
languages_mapping: *anchor
48-
- source: '/website/i18n/en.json'
49-
translation: '/website/i18n/%locale%.json'
50-
languages_mapping: *anchor
27+
[
28+
{
29+
'source': '/website/i18n/en/**/*',
30+
'translation': '/website/i18n/%locale%/**/%original_file_name%',
31+
'languages_mapping': *languages_mapping,
32+
},
33+
{
34+
'source': '/docs/**/*',
35+
'translation': '/website/i18n/%locale%/docusaurus-plugin-content-docs/current/**/%original_file_name%',
36+
'languages_mapping': *languages_mapping,
37+
},
38+
{
39+
'source': '/website/versioned_docs/**/*',
40+
'translation': '/website/i18n/%locale%/docusaurus-plugin-content-docs/**/%original_file_name%',
41+
'languages_mapping': *languages_mapping,
42+
},
43+
{
44+
'source': '/website/blog/**/*',
45+
'translation': '/website/i18n/%locale%/docusaurus-plugin-content-blog/**/%original_file_name%',
46+
'languages_mapping': *languages_mapping,
47+
},
48+
]

docs/CLI.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ jest --update-snapshot --detectOpenHandles
100100

101101
_Note: CLI options take precedence over values from the [Configuration](Configuration.md)._
102102

103-
<AUTOGENERATED_TABLE_OF_CONTENTS>
103+
import TOCInline from "@theme/TOCInline"
104+
105+
<TOCInline toc={toc[toc.length - 1].children}/>
104106

105107
---
106108

0 commit comments

Comments
 (0)