Skip to content

Commit

Permalink
Migrate Docs to Nextra (#320)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Janon <[email protected]>
  • Loading branch information
Mfigueira and lucas-janon authored May 9, 2024
1 parent 068440f commit 0e35d8d
Show file tree
Hide file tree
Showing 762 changed files with 9,906 additions and 15,027 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.cache
node_modules
public
.next
.vscode
.git
.yarn
62 changes: 52 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ const ERROR = 2;
*/
module.exports = {
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
"simple-import-sort",
"prettier",
"unused-imports",
],
plugins: ["@typescript-eslint", "simple-import-sort", "prettier", "unused-imports"],
extends: ["prettier"],
env: {
es6: true,
Expand All @@ -31,10 +26,7 @@ module.exports = {
},
},
parserOptions: {
project: [
path.join(__dirname, "tsconfig.json"),
path.join(__dirname, "tsconfig.eslint.json"),
],
project: [path.join(__dirname, "tsconfig.json"), path.join(__dirname, "tsconfig.eslint.json")],
},
rules: {
"no-process-env": OFF,
Expand All @@ -60,4 +52,54 @@ module.exports = {
},
],
},
overrides: [
{
files: ["./src"],
plugins: ["react", "react-hooks"],
extends: ["plugin:@next/next/recommended", "airbnb", "airbnb-typescript"],
rules: {
"react/function-component-definition": OFF,
"react/prop-types": OFF,
"jsx-a11y/anchor-is-valid": OFF,
"react/require-default-props": OFF,
"react/jsx-props-no-spreading": OFF,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"arrow-body-style": "off",
},
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
env: {
browser: true,
es6: true,
},
settings: {
react: {
version: "detect",
},
},
globals: {
React: true,
JSX: true,
},
},
{
files: ["./src/pages/**/*", "*.d.ts", "next-seo.config.js"],
rules: {
"import/no-default-export": OFF,
},
},
{
// @description Allow param reassign on redux files (immer.js)
files: ["*.redux.js", "*.redux.ts", "*.slice.js", "*.slice.ts", "*.reducer.ts", "*.reducer.js"],
rules: {
"no-param-reassign": OFF,
},
},
],
};
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run:
vercel pull --yes --environment=production --token=${{
run: vercel pull --yes --environment=production --token=${{
secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-from-toolkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:

- name: Update docs
run: |
mkdir -p static/packages/toolkit
rm -rf static/packages/toolkit/*
cp -r toolkit/docs/* static/packages/toolkit/
mkdir -p public/packages/toolkit
rm -rf public/packages/toolkit/*
cp -r toolkit/docs/* public/packages/toolkit/
rm -rf toolkit
- name: Check for changes
id: check-changes
run: |
git add static/packages/toolkit
git add public/packages/toolkit
git diff --cached --exit-code || echo "::set-output name=changed::true"
- name: Create Pull Request
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/update-from-zeta-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ jobs:

- name: Update module docs
run: |
mkdir -p docs/architecture/modules
rm -rf docs/architecture/modules/*
cp -r node/docs/spec/* docs/architecture/modules/
mkdir -p src/pages/architecture/modules
rm -rf src/pages/architecture/modules/*
cp -r node/docs/spec/* src/pages/architecture/modules/
- name: Update zetacored CLI docs
run: |
mkdir -p docs/architecture/zetacored
rm -rf docs/architecture/zetacored/*
cp -r node/docs/cli/zetacored/* docs/architecture/zetacored/
mkdir -p src/pages/architecture/zetacored
rm -rf src/pages/architecture/zetacored/*
cp -r node/docs/cli/zetacored/* src/pages/architecture/zetacored/
- name: Update OpenAPI specs
run: |
mkdir -p static/data
rm -rf static/data/openapi.swagger.yaml
cp -r node/docs/openapi/openapi.swagger.yaml static/data/
echo -e "\nhost: zetachain-athens.blockpi.network/lcd/v1/public" >> static/data/openapi.swagger.yaml
mkdir -p public/data
rm -rf public/data/openapi.swagger.yaml
cp -r node/docs/openapi/openapi.swagger.yaml public/data/
echo -e "\nhost: zetachain-athens.blockpi.network/lcd/v1/public" >> public/data/openapi.swagger.yaml
rm -rf node
- name: Check for changes
id: check-changes
run: |
git add docs/architecture/modules
git add static/data/openapi.swagger.yaml
git add src/pages/architecture/modules
git add public/data/openapi.swagger.yaml
git diff --cached --exit-code || echo "::set-output name=changed::true"
- name: Create Pull Request
Expand Down
18 changes: 0 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# Generated files
.docusaurus
.cache-loader

# Misc
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# dependencies
/node_modules
/.pnp
Expand Down Expand Up @@ -46,6 +31,3 @@ yarn-error.log*

# typescript
*.tsbuildinfo

# Sentry
.sentryclirc
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.yarn
node_modules
**/.next/**
**/dist/**
**/build/**
**/tmp/**
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 120
}
27 changes: 10 additions & 17 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
module.exports = {
presets: [
require.resolve("@docusaurus/core/lib/babel/preset"),
// [
// "next/babel",
// {
// "preset-react": {
// runtime: "automatic",
// importSource: "@emotion/react",
// },
// },
// ],
],
plugins: [
["@babel/plugin-proposal-private-methods", { loose: false }],
["@babel/plugin-proposal-private-property-in-object", { loose: false }],
"@emotion/babel-plugin",
"babel-plugin-twin",
"babel-plugin-macros",
[
"next/babel",
{
"preset-react": {
runtime: "automatic",
importSource: "@emotion/react",
},
},
],
],
plugins: ["@emotion/babel-plugin", "babel-plugin-macros"],
};
5 changes: 0 additions & 5 deletions docs/about/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/about/token-utility/_category_.json

This file was deleted.

4 changes: 0 additions & 4 deletions docs/architecture/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/developers/_category_.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/developers/cli/_category_.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/developers/cli/governance/_category_.json

This file was deleted.

4 changes: 0 additions & 4 deletions docs/developers/cross-chain-messaging/_category_.json

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions docs/developers/omnichain/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/developers/omnichain/tutorials/_category_.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/developers/omnichain/tutorials/nft/_category_.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/developers/tokens/_category_.json

This file was deleted.

17 changes: 0 additions & 17 deletions docs/developers/tokens/erc20.md

This file was deleted.

39 changes: 0 additions & 39 deletions docs/home.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/reference/_category_.json

This file was deleted.

15 changes: 0 additions & 15 deletions docs/reference/contracts.mdx

This file was deleted.

5 changes: 0 additions & 5 deletions docs/reference/openapi.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions docs/users/_category_.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/users/keplr/_category_.json

This file was deleted.

Loading

0 comments on commit 0e35d8d

Please sign in to comment.