Skip to content

Commit c6163dc

Browse files
authored
Fix filepath to main.ts in customizing_cli.md and generation.md (#271)
1 parent 590e081 commit c6163dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hugo/content/docs/learn/minilogo/customizing_cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Once you have a grammar and some validation in place, you may want to start conf
1515

1616
## About the Command Line Interface
1717

18-
If you've been using a language built with the yeoman generator for Langium, you should be able to find your CLI defined in **src/cli/index.ts**. This file describes the general layout of your languages's command line interface, and lets you register specific commands. By default, you're provided with a single command for your CLI, the **generate** command.
18+
If you've been using a language built with the yeoman generator for Langium, you should be able to find your CLI defined in **src/cli/main.ts**. This file describes the general layout of your languages's command line interface, and lets you register specific commands. By default, you're provided with a single command for your CLI, the **generate** command.
1919

2020
Much like the command implies, it allows you to take a program written in your DSL, parse it, and traverse the AST to produce some sort of generated output. We won't talk about the generator itself in this tutorial (that will come in the [next tutorial on generation](/docs/learn/minilogo/generation)). Instead we'll focus on a simple example for parsing and validating a program, which allows learning more about the CLI itself.
2121

@@ -25,7 +25,7 @@ To start, let's write up a custom action to allow us to **parse** and **validate
2525

2626
Feel free to keep (or remove) the existing **generate** action, as we won't be setting that up until the next tutorial. We'll be sure to present example code for that as well, so don't worry about deleting functions that you'll need later.
2727

28-
In order to add our new command, we need to register it in the default export for the **index.ts** file. In this function, there's a **command** object, which is a collection of commands for our CLI. Let's call our command `parseAndValidate`, and give it some extra details, like:
28+
In order to add our new command, we need to register it in the default export for the **src/cli/main.ts** file. In this function, there's a **command** object, which is a collection of commands for our CLI. Let's call our command `parseAndValidate`, and give it some extra details, like:
2929

3030
- **arguments**: Indicating that it takes a single file
3131
- a **description** detailing what this action does

hugo/content/docs/learn/minilogo/generation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ export function generateCommands(model: Model, filePath: string, destination: st
312312
}
313313
```
314314

315-
And to connect it to the CLI, which is setup in **src/cli/index.ts**, we can register it by slightly modifying the existing `generateAction` endpoint that was there by default.
315+
And to connect it to the CLI, which is setup in **src/cli/main.ts**, we can register it by slightly modifying the existing `generateAction` endpoint that was there by default.
316316

317317
```ts
318318
export const generateAction = async (fileName: string, opts: GenerateOptions): Promise<void> => {

0 commit comments

Comments
 (0)