Skip to content

Commit

Permalink
Pull changes from latest docusaurus and update the head to reflect pr…
Browse files Browse the repository at this point in the history
…oper manifest in application
  • Loading branch information
tirthbodawala committed Oct 17, 2018
2 parents fb8287b + ba96992 commit 06ca233
Show file tree
Hide file tree
Showing 502 changed files with 31,688 additions and 22,341 deletions.
14 changes: 0 additions & 14 deletions .babelrc

This file was deleted.

128 changes: 101 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
aliases:
- &restore-yarn-cache
- &root-yarn
|
yarn install --non-interactive --cache-folder ~/.cache/yarn

- &root-restore-yarn-cache
keys:
- root-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- root-yarn-{{ .Branch }}-

- &root-save-yarn-cache
paths:
- node_modules
- ~/.cache/yarn
key: root-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}

- &v1-yarn
|
cd v1
yarn install --non-interactive --cache-folder ~/.cache/yarn

- &v1-restore-yarn-cache
keys:
- v1-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- v1-yarn-{{ .Branch }}-

- &save-yarn-cache
- &v1-save-yarn-cache
paths:
- node_modules
- v1/node_modules
- ~/.cache/yarn
key: v1-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}

- &v2-yarn
|
cd v2
yarn install --non-interactive --cache-folder ~/.cache/yarn

- &v2-restore-yarn-cache
keys:
- v2-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- v2-yarn-{{ .Branch }}-

- &v2-save-yarn-cache
paths:
- v2/node_modules
- ~/.cache/yarn
key: v2-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}

- &filter-only-master
branches:
only:
Expand All @@ -20,10 +58,6 @@ aliases:
branches:
ignore: gh-pages

- &yarn
|
yarn install --non-interactive --cache-folder ~/.cache/yarn

defaults: &defaults
working_directory: ~/docusaurus
docker:
Expand All @@ -32,32 +66,45 @@ defaults: &defaults

version: 2
jobs:
tests:
prettier:
<<: *defaults
steps:
- checkout
- restore-cache: *root-restore-yarn-cache
- run: *root-yarn
- save-cache: *root-save-yarn-cache
- run:
name: Check Prettier
command: |
yarn install
yarn prettier:diff
v1-tests:
<<: *defaults
steps:
- checkout
- restore-cache: *restore-yarn-cache
- run: *yarn
- save-cache: *save-yarn-cache
- restore-cache: *v1-restore-yarn-cache
- run: *v1-yarn
- save-cache: *v1-save-yarn-cache
- run:
name: Check Prettier & ESLint
command: yarn ci-check
name: Check ESLint
command: cd v1 && yarn lint
- run:
name: Run Test Suites
command: yarn test
command: cd v1 && yarn test
- run:
name: Test Static Website Builds
command: cd website && yarn run build
command: cd v1/website && yarn build

# The CIRCLE_ variables are defined during the CircleCI build process
# https://circleci.com/docs/1.0/environment-variables/
deploy-website:
v1-deploy-website:
<<: *defaults
steps:
- checkout
- restore-cache: *restore-yarn-cache
- run: *yarn
- save-cache: *save-yarn-cache
- restore-cache: *v1-restore-yarn-cache
- run: *v1-yarn
- save-cache: *v1-save-yarn-cache
- run:
name: Configure GitHub Bot
# Do not do this if we don't have the right org (facebook), or if this is just a pull request
Expand All @@ -74,7 +121,7 @@ jobs:
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
echo "Deploying website..."
# install Docusaurus and generate file of English strings
yarn && cd website && yarn run write-translations
cd v1 && yarn && cd website && yarn run write-translations
# install Crowdin
sudo apt-get update
sudo apt-get install default-jre rsync
Expand All @@ -90,13 +137,30 @@ jobs:
echo "Skipping deploy."
fi
v2-tests:
<<: *defaults
steps:
- checkout
- restore-cache: *v2-restore-yarn-cache
- run: *v2-yarn
- save-cache: *v2-save-yarn-cache
- run:
name: Check ESLint
command: cd v2 && yarn lint
- run:
name: Run Test Suites
command: cd v2 && yarn test
- run:
name: Test Static Website Builds
command: cd v2/website && yarn build

publish-npm:
<<: *defaults
steps:
- checkout
- restore-cache: *restore-yarn-cache
- run: *yarn
- save-cache: *save-yarn-cache
- restore-cache: *v1-restore-yarn-cache
- run: *v1-yarn
- save-cache: *v1-save-yarn-cache
- run:
name: Publish Docusaurus Package
command: |
Expand All @@ -111,15 +175,25 @@ jobs:
workflows:
version: 2

website:
prettier:
jobs:
- tests:
- prettier:
filters: *filter-ignore-gh-pages
- deploy-website:

v1:
jobs:
- v1-tests:
filters: *filter-ignore-gh-pages
- v1-deploy-website:
requires:
- tests
- v1-tests
filters: *filter-only-master

v2:
jobs:
- v2-tests:
filters: *filter-ignore-gh-pages

deploy:
jobs:
- hold:
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# https://help.github.com/articles/about-codeowners/
/v2/ @endiliey
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: 📚 Documentation
about: Report an issue related to documentation
---

## 📚 Documentation

(A clear and concise description of what the issue is.)

### Have you read the [Contributing Guidelines on issues](https://github.com/facebook/Docusaurus/blob/master/CONTRIBUTING.md#reporting-new-issues)?

(Write your answer here.)
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,5 @@
node_modules

.eslintcache
lib/core/metadata.js
lib/core/MetadataBlog.js
lib/pages/

website/build/
website/i18n/*
website/node_modules
website/package-lock.json
website/translated_docs
website/yarn.lock

yarn-error.log
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"printWidth": 80,
"proseWrap": "never",
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "all"
}
Loading

0 comments on commit 06ca233

Please sign in to comment.