Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli)!: rename gen-docs command to docs #7071

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.