From 40576e4f407f89d39500160aec5ea0098acedf17 Mon Sep 17 00:00:00 2001 From: Kai Salmen Date: Fri, 21 Jun 2024 14:22:52 +0200 Subject: [PATCH] Updated READMEs once more --- .../generator-langium/templates/README.md | 13 +++++++---- .../templates/packages/cli/README.md | 16 ++++--------- .../packages/extension/langium-quickstart.md | 8 +++---- .../templates/packages/language/README.md | 23 ++++++++++++------- .../templates/packages/web/README.md | 16 ++++++------- 5 files changed, 40 insertions(+), 36 deletions(-) diff --git a/packages/generator-langium/templates/README.md b/packages/generator-langium/templates/README.md index df087c223..7d25bb5f9 100644 --- a/packages/generator-langium/templates/README.md +++ b/packages/generator-langium/templates/README.md @@ -1,16 +1,19 @@ # Workspace overview -Depending on the selection during the project generation you will have one or more packages contained in the packages directory. Check the : +Depending on the selection during the project generation you will have one or more packages contained in the packages directory. +Please check the specific projects here: -- [packages/language](./packages/language/README.md) is always available and contains the language definition. +- [packages/language](./packages/language/README.md) This package is always available and contains the language definition. - [packages/cli](./packages/cli/README.md) *Optional* Is only available if you chose to use the command-line interface. - [packages/extension](./packages/extension/langium-quickstart.md) *Optional* Contains the VSCode extension if you chose to create it. -- [packages/web](./packages/web/README.md) *Optional* if selected contains the language server running in a web browser and a monaco-editor with language support similar to the onm from VSCode. +- [packages/web](./packages/web/README.md) *Optional* If selected contains the language server running in a web browser and a monaco-editor with language support similar to the onm from VSCode. ## What's in the folder? -- [.eslintrc.json](.eslintrc.json) - Configuration file for eslint -- [.gitignore](.gitignore) - Files ignored by git +Some file are contained in the root directory as well. + - [package.json](./package.json) - The manifest file the main workspace package - [tsconfig.json](./tsconfig.json) - The base TypeScript compiler configuration - [tsconfig.build.json](./package.json) - Configuration used to build the complete source code. +- [.eslintrc.json](.eslintrc.json) - Configuration file for eslint +- [.gitignore](.gitignore) - Files ignored by git diff --git a/packages/generator-langium/templates/packages/cli/README.md b/packages/generator-langium/templates/packages/cli/README.md index 1bf4b8a6c..82c6c9bce 100644 --- a/packages/generator-langium/templates/packages/cli/README.md +++ b/packages/generator-langium/templates/packages/cli/README.md @@ -5,15 +5,9 @@ Check [this part](https://langium.org/docs/learn/minilogo/customizing_cli/) of t ## What's in the folder? - [package.json](./package.json) - The manifest file of your cli package. -- [tsconfig.src.json](./tsconfig.src.json) - The package specific TypeScript compiler configuration extending the [base config](../../tsconfig.json) +- [tsconfig.src.json](./tsconfig.src.json) - The package specific TypeScript compiler configuration extending the [base config](../../tsconfig.json). - [tsconfig.json](./tsconfig.json) - TypeScript compiler configuration options required for proper functionality of VSCode. -- [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. - -If you selected the test option as well, then you have the following for file as well: - -- [tsconfig.test.json](./tsconfig.test.json) - The package specific TypeScript compiler configuration for the unit tests extending the [tsconfig.src.config](tsconfig.src.json) -- [test/linking.test.ts](test/linking.test.ts) - Unit tests checking linking. -- [test/parsing.test.ts](test/parsing.test.ts) - Unit tests regarding parsing. -- [test/validating.test.ts](test/validating.test.ts) - Unit tests regarding validation. +- [bin/cli.js](bin/cli/cli.js) - Script referenced in the [package.json](./package.json) and used to execute the command-line interface. +- [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. diff --git a/packages/generator-langium/templates/packages/extension/langium-quickstart.md b/packages/generator-langium/templates/packages/extension/langium-quickstart.md index 5a1ba5105..ae7de4d2c 100644 --- a/packages/generator-langium/templates/packages/extension/langium-quickstart.md +++ b/packages/generator-langium/templates/packages/extension/langium-quickstart.md @@ -4,12 +4,12 @@ Welcome to your Langium VSCode extension. This folder contains all necessary fil ## What's in the folder? -- [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) +- [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. +- [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 diff --git a/packages/generator-langium/templates/packages/language/README.md b/packages/generator-langium/templates/packages/language/README.md index 57396c287..13970257c 100644 --- a/packages/generator-langium/templates/packages/language/README.md +++ b/packages/generator-langium/templates/packages/language/README.md @@ -6,12 +6,19 @@ As a good entry point to our documentation, please use to this [guide](https://l - [package.json](./package.json) - The manifest file of your language package. - [tsconfig.json](./tsconfig.json) - The packages specific TypeScript compiler configuration extending the [base config](../../tsconfig.json) -- [src/<%= language-id %>.langium](src/<%= language-id %>.langium) - the grammar definition of your language -- [src/<%= language-id %>-module.ts](src/<%= language-id %>-module.ts) - the dependency injection module of your language implementation. Use this to register overridden and added services. -- [src/<%= language-id %>-validator.ts](src/<%= language-id %>-validator.ts) - an example validator. You should change it to reflect the semantics of your language -- [src/generated/ast.ts](src/generated/ast.ts) - Generated AST -- [src/generated/grammar.ts](src/generated/grammar.ts) - Generated Grammar -- [src/generated/module.ts](src/generated/module.ts) - Generated Module -- [src/syntaxes/<%= language-id %>.monarch.ts](src/syntaxes/<%= language-id %>.monarch.ts) - Monarch based syntax highlighting instructions -- [syntaxes/<%= language-id %>.tmLanguage.json](syntaxes/<%= language-id %>.tmLanguage.json) - Textmate based syntax highlighting instructions +- [src/<%= language-id %>.langium](src/<%= language-id %>.langium) - The grammar definition of your language +- [src/<%= language-id %>-module.ts](src/<%= language-id %>-module.ts) - The dependency injection module of your language implementation. Use this to register overridden and added services. +- [src/<%= language-id %>-validator.ts](src/<%= language-id %>-validator.ts) - An example validator. You should change it to reflect the semantics of your language. +- [src/generated/ast.ts](src/generated/ast.ts) - AST generated by `langium generate`. +- [src/generated/grammar.ts](src/generated/grammar.ts) - Grammar generated by `langium generate`. +- [src/generated/module.ts](src/generated/module.ts) - Module generated by `langium generate`. +- [src/syntaxes/<%= language-id %>.monarch.ts](src/syntaxes/<%= language-id %>.monarch.ts) - Monarch based syntax highlighting instructions. +- [syntaxes/<%= language-id %>.tmLanguage.json](syntaxes/<%= language-id %>.tmLanguage.json) - Textmate based syntax highlighting instructions. - [src/index.ts](src/index.ts) Defines what is exported to other packages. + +If you selected the test option as well, then the following files will be present in addition: + +- [tsconfig.test.json](./tsconfig.test.json) - The package specific TypeScript compiler configuration for the unit tests extending the [tsconfig.src.config](./tsconfig.src.json) +- [test/linking.test.ts](test/linking.test.ts) - Unit tests checking linking. +- [test/parsing.test.ts](test/parsing.test.ts) - Unit tests regarding parsing. +- [test/validating.test.ts](test/validating.test.ts) - Unit tests regarding validation. diff --git a/packages/generator-langium/templates/packages/web/README.md b/packages/generator-langium/templates/packages/web/README.md index d5d325140..47e741bee 100644 --- a/packages/generator-langium/templates/packages/web/README.md +++ b/packages/generator-langium/templates/packages/web/README.md @@ -5,21 +5,21 @@ How the web based editor works is well defined [here](https://langium.org/docs/l ## What's in the folder? - [index.html](index.html) - Entry page that let's you decide which web editor version is used. -- [language-configuration.json](language-configuration.json) - the language configuration used in the web editor, defining the tokens that are used for comments and brackets. +- [language-configuration.json](language-configuration.json) - The language configuration used in the web editor, defining the tokens that are used for comments and brackets. - [package.json](./package.json) - The manifest file of your web editor package. - [src/main-browser.ts](src/main-browser.ts) - The the language server running in a web worker. -- [src/setupClassic.ts](src/setupClassic.ts) - Create monaco-editor with classic configuration (monarch sytax highlighting) -- [src/setupCommon.ts](src/setupCommon.ts) - Common settings for monaco-editor -- [src/setupExtended.ts](src/setupExtended.ts) - Create monaco-editor with extended configuration (textmate sytax highlighting) -- [static/monacoClassic.html](static/monacoClassic.html) - Page for classic monaco-editor -- [static/monacoExtended.html](static/monacoExtended.html) - Page for extended monaco-editor -- [static/styles.css](static/styles.css) - Stylesheets used by the HTML pages +- [src/setupClassic.ts](src/setupClassic.ts) - Use monaco-editor with classic configuration (monarch sytax highlighting). +- [src/setupCommon.ts](src/setupCommon.ts) - File containing common settings for monaco-editor. +- [src/setupExtended.ts](src/setupExtended.ts) - Use monaco-editor with extended configuration (textmate sytax highlighting). +- [static/monacoClassic.html](static/monacoClassic.html) - Web page containing the classic monaco-editor. +- [static/monacoExtended.html](static/monacoExtended.html) - Web page containing the extended monaco-editor. +- [static/styles.css](static/styles.css) - Stylesheets used by the HTML pages. - [tsconfig.json](./tsconfig.json) - The packages specific TypeScript compiler configuration extending the [base config](../../tsconfig.json) - [vite.config.ts](vite.config.ts) - Vite/rollup production build instructions ## Run the web application -The generation post-step ensure that the whole project is built. +The generation post-step ensure that the whole project is built, so you don't have to repeat it before issuing the next steps below. You can run chose to run the application either in development mode (code changes are directly available in the application) or production mode (bundled). For development: