Skip to content

Commit

Permalink
feat(cli)!: rename gen-docs command to docs (#7071)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriscbr authored Sep 3, 2024
1 parent fb852cf commit cc77a45
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 45 deletions.
6 changes: 3 additions & 3 deletions docs/api/02-cli-user-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,14 @@ This will compile your current Wing directory, and bundle it as a tarball that c
See [Libraries](/docs/category/wing-libraries-winglibs) for more details on packaging and consuming Wing libraries.
## Generate Docs: `wing gen-docs`
## Generate Docs: `wing docs`
The `wing gen-docs` command can be used to generate API documentation for your Wing project.
The `wing docs` command can be used to generate API documentation for your Wing project.
Usage:
```sh
$ wing gen-docs
$ wing docs
```
This will generate a file named `API.md` in the root of your project.
Expand Down
2 changes: 1 addition & 1 deletion packages/@winglibs/testfixture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"compile": "wing compile .",
"test": "wing test && wing gen-docs"
"test": "wing test && wing docs"
},
"license": "MIT",
"engines": {
Expand Down
1 change: 0 additions & 1 deletion packages/winglang/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"inquirer": "^8.2.6",
"nanoid": "^3.3.7",
"npm-packlist": "^8.0.2",
"open": "^8.4.2",
"ora": "^5.4.1",
"tar": "^6.2.1",
"tiny-updater": "^3.5.2",
Expand Down
8 changes: 1 addition & 7 deletions packages/winglang/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async function main() {
.action(runSubCommand("lsp"));

program
.command("gen-docs")
.command("docs")
.description("Generate documentation for the current project")
.hook("preAction", collectAnalyticsHook)
.action(runSubCommand("generateDocs"));
Expand Down Expand Up @@ -276,12 +276,6 @@ async function main() {
.hook("postAction", collectAnalyticsHook) // to catch the options that are added later
.action(runSubCommand("init"));

program
.command("docs")
.description("Open the Wing documentation")
.hook("preAction", collectAnalyticsHook)
.action(runSubCommand("docs"));

program.hook("postAction", exportAnalyticsHook);

program.parse();
Expand Down
10 changes: 0 additions & 10 deletions packages/winglang/src/commands/docs.test.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/winglang/src/commands/docs.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/winglang/src/commands/generateDocs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { generateDocs } from "./generateDocs";

const fixturesDir = join(__dirname, "..", "..", "fixtures");

describe("wing gen-docs", () => {
describe("wing docs", () => {
afterEach(() => {
vi.restoreAllMocks();
});
Expand Down
1 change: 0 additions & 1 deletion packages/winglang/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./compile";
export * from "./upgrade";
export * from "./test";
export * from "./docs";
export * from "./run";
29 changes: 13 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc77a45

Please sign in to comment.