Scaffolding CLI files #332
-
I just created a new language project using the Yeoman generator. The resulting .ts files that are generated in the src/cli folder obviously reference the sample Greeting grammar. Are these files generated by the Yeoman generator as a courtesy for the user, or are they generated by the langium cli when you run npm run langium:generate? In other words, should I expect that, if my grammar changes, and I regenerate code, that the cli files will be changed accordingly, or should I expect to modify these files manually to match my metamodel? My guess is that the latter is the case. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @ballcoach12, the yeoman generator basically creates a small sample Langium project, including CLI files and stuff like validation. It's just there to show how one could build CLIs and validators using Langium, but it's not generated using the langium-cli. You can simply delete it, if you don't need a CLI (which is our recommended way of building code generators) or modify it manually to match your model. The langium-cli only generates 4 files in total, the |
Beta Was this translation helpful? Give feedback.
Hi @ballcoach12,
the yeoman generator basically creates a small sample Langium project, including CLI files and stuff like validation. It's just there to show how one could build CLIs and validators using Langium, but it's not generated using the langium-cli. You can simply delete it, if you don't need a CLI (which is our recommended way of building code generators) or modify it manually to match your model.
The langium-cli only generates 4 files in total, the
ast.ts
,grammar.ts
,module.ts
and optionally a textMate grammar json.