Skip to content

Commit

Permalink
Fix documentation and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Jul 5, 2024
1 parent 3c0b81d commit 1067de6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
4 changes: 4 additions & 0 deletions packages/generator-langium/templates/packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ Check [this part](https://langium.org/docs/learn/minilogo/customizing_cli/) of t
- [src/cli/main.ts](src/cli/main.ts) - The entry point of the command line interface (CLI) of your language.
- [src/cli/generator.ts](src/cli/generator.ts) - The code generator used by the CLI to write output files from DSL documents.
- [src/cli/util.ts](src/cli/util.ts) - Utility code for the CLI.

## Instructions

Run `node ./bin/cli` to see options for the CLI; `node ./bin/cli generate <file>` generates code for a given DSL file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Welcome to your Langium VSCode extension. This folder contains all necessary fil

- [package.json](./package.json) - The manifest file in which you declare your language support.
- [tsconfig.json](./tsconfig.json) - The packages specific TypeScript compiler configuration extending the [base config](../../tsconfig.json).
- [esbuid.mjs](esbuild.mjs) - Configuration file for esbuild that is used to create the VSCode extension bundle.
- [language-configuration.json](language-configuration.json) - the language configuration used in the VS Code editor, defining the tokens that are used for comments and brackets.
- [src/language/main.ts](src/language/main.ts) - The entry point of the language server process.
- [src/extension/main.ts](src/extension/main.ts) - The main code of the extension, which is responsible for launching a language server and client.
- [esbuild.mjs](./esbuild.mjs) - Configuration file for esbuild that is used to create the VSCode extension bundle.
- [language-configuration.json](./language-configuration.json) - the language configuration used in the VS Code editor, defining the tokens that are used for comments and brackets.
- [src/language/main.ts](./src/language/main.ts) - The entry point of the language server process.
- [src/extension/main.ts](./src/extension/main.ts) - The main code of the extension, which is responsible for launching a language server and client.

## Get up and running straight away

Expand All @@ -18,7 +18,6 @@ Welcome to your Langium VSCode extension. This folder contains all necessary fil
- Press `F5` to open a new window with your extension loaded.
- Create a new file with a file name suffix matching your language.
- Verify that syntax highlighting, validation, completion etc. are working as expected.
- Run `node ./bin/cli` to see options for the CLI; `node ./bin/cli generate <file>` generates code for a given DSL file.

## Make changes

Expand Down
14 changes: 8 additions & 6 deletions packages/generator-langium/test/yeoman-generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,12 @@ const PACKAGE_JSON_EXPECTATION_WEB: Record<string, any> = {
files: ['out', 'src'],
scripts: {
'clean': 'shx rm -fr *.tsbuildinfo out dist syntaxes',
'build': 'vite build',
'build:prepare': 'shx mkdir -p ./syntaxes/ && shx cp -f ../language/syntaxes/hello-world.tmLanguage.json ./syntaxes/hello-world.tmLanguage.json',
'build': 'npm run build:prepare && vite build',
'build:clean': 'npm run clean && npm run build',
'dev': 'vite',
'dev:debug': 'vite --debug --force',
'serve': 'vite preview'
'dev': 'npm run build:prepare && vite',
'dev:debug': 'npm run build:prepare && vite --debug --force',
'serve': 'npm run build:prepare && vite preview'
},
dependencies: {
'@codingame/monaco-vscode-editor-service-override': '~6.0.3',
Expand Down Expand Up @@ -364,9 +365,10 @@ const PACKAGE_JSON_EXPECTATION_EXTENSION: Record<string, any> = {
scripts: {
'clean': 'shx rm -fr *.tsbuildinfo out syntaxes',
'vscode:prepublish': 'npm run build && npm run lint',
'build': 'tsc -b tsconfig.json && node esbuild.mjs',
'build:prepare': 'shx mkdir -p ./syntaxes/ && shx cp -f ../language/syntaxes/hello-world.tmLanguage.json ./syntaxes/hello-world.tmLanguage.json',
'build': 'npm run build:prepare && tsc -b tsconfig.json && node esbuild.mjs',
'build:clean': 'npm run clean && npm run build',
'watch': 'concurrently -n tsc,esbuild -c blue,yellow "tsc -b tsconfig.json --watch" "node esbuild.mjs --watch"'
'watch': 'npm run build:prepare && concurrently -n tsc,esbuild -c blue,yellow "tsc -b tsconfig.json --watch" "node esbuild.mjs --watch"'
},
dependencies: {
'hello-world-language': '0.0.1',
Expand Down

0 comments on commit 1067de6

Please sign in to comment.