Skip to content

Commit

Permalink
Move CLI docs into admin section
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjstevens committed Dec 11, 2024
1 parent e0b77db commit 505dc91
Show file tree
Hide file tree
Showing 37 changed files with 53 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .husky/pre-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function main() {
'readme',
'--multi',
'--dir',
'../website/docs/cli/',
'../website/docs/admin/cli/',
],
{ stdio: 'inherit' },
)
Expand All @@ -49,7 +49,7 @@ function main() {
[
'add',
'packages/apollo-cli/README.md',
'packages/website/docs/cli/*.md',
'packages/website/docs/admin/cli/*.md',
],
{ stdio: 'inherit' },
)
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test": "mocha --require src/test/fixtures.ts 'src/**/*.test.ts'",
"posttest": "yarn lint",
"test:ci": "nyc mocha 'src/**/*.test.ts'",
"version": "oclif readme --multi --dir ../website/docs/cli/ && oclif readme && git add README.md"
"version": "oclif readme --multi --dir ../website/docs/admin/cli/ && oclif readme && git add README.md"
},
"oclif": {
"bin": "apollo",
Expand Down
6 changes: 6 additions & 0 deletions packages/website/docs/admin/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"label": "Admin",
"link": {
"type": "generated-index"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "CLI",
"label": "CLI Reference",
"position": 3,
"link": {
"type": "generated-index",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions packages/website/docs/admin/user-guide/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Loading data (GUI)",
"position": 2,
"link": {
"type": "generated-index",
"description": "Loading data with the graphical user interface (GUI)"
}
}
File renamed without changes
11 changes: 11 additions & 0 deletions packages/website/docs/getting-started/try-it-out/01-setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ $ apollo --version
@apollo-annotation/cli/0.1.20 linux-x64 node-v18.20.4
```

:::tip

If you're familiar with installing Node.js packages you can install the Apollo
CLI instead of using Docker.

```bash npm2yarn
npm install -g @apollo-annotation/cli
```

:::

## Running Apollo

Create a file called `config.yml` and paste the following contents into the
Expand Down
8 changes: 0 additions & 8 deletions packages/website/docs/user-guide/_category_.json

This file was deleted.

2 changes: 2 additions & 0 deletions packages/website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { themes as prismThemes } from 'prism-react-renderer'
import type { Config } from '@docusaurus/types'
import type * as Preset from '@docusaurus/preset-classic'
import remarkPluginNpm2Yarn from '@docusaurus/remark-plugin-npm2yarn'

const config: Config = {
title: 'Apollo',
Expand Down Expand Up @@ -40,6 +41,7 @@ const config: Config = {
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/GMOD/Apollo3/tree/main/packages/website/',
remarkPlugins: [[remarkPluginNpm2Yarn, { sync: true }]],
},
theme: {
customCss: './src/css/custom.css',
Expand Down
1 change: 1 addition & 0 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"dependencies": {
"@docusaurus/core": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@docusaurus/remark-plugin-npm2yarn": "^3.6.3",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"prism-react-renderer": "^2.3.0",
Expand Down
21 changes: 21 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ __metadata:
"@docusaurus/core": "npm:3.5.2"
"@docusaurus/module-type-aliases": "npm:^3.5.2"
"@docusaurus/preset-classic": "npm:3.5.2"
"@docusaurus/remark-plugin-npm2yarn": "npm:^3.6.3"
"@docusaurus/theme-classic": "npm:^3.5.2"
"@docusaurus/tsconfig": "npm:^3.5.2"
"@docusaurus/types": "npm:^3.5.2"
Expand Down Expand Up @@ -5059,6 +5060,19 @@ __metadata:
languageName: node
linkType: hard

"@docusaurus/remark-plugin-npm2yarn@npm:^3.6.3":
version: 3.6.3
resolution: "@docusaurus/remark-plugin-npm2yarn@npm:3.6.3"
dependencies:
mdast-util-mdx: "npm:^3.0.0"
npm-to-yarn: "npm:^3.0.0"
tslib: "npm:^2.6.0"
unified: "npm:^11.0.3"
unist-util-visit: "npm:^5.0.0"
checksum: 10c0/6471afa24af2e9ff57e7b990030851252a5a1527fc50a87dfc59b4d5d691715b0086a786f444b90665a588cc622bfeb20d39949984387a9aef3c4d30f37f8b29
languageName: node
linkType: hard

"@docusaurus/theme-classic@npm:3.5.2, @docusaurus/theme-classic@npm:^3.5.2":
version: 3.5.2
resolution: "@docusaurus/theme-classic@npm:3.5.2"
Expand Down Expand Up @@ -24009,6 +24023,13 @@ __metadata:
languageName: node
linkType: hard

"npm-to-yarn@npm:^3.0.0":
version: 3.0.0
resolution: "npm-to-yarn@npm:3.0.0"
checksum: 10c0/2e0bba85dc4ac83d588da6a3636e4043beecb6360be76c110a982432ddc6c63fe181524aa767c97da4799fe80a104e0502901a177fb3a82f233722ded35a3a27
languageName: node
linkType: hard

"npmlog@npm:^5.0.1":
version: 5.0.1
resolution: "npmlog@npm:5.0.1"
Expand Down

0 comments on commit 505dc91

Please sign in to comment.