Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

langium-cli

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langium-cli

CLI for Langium - the language engineering tool

  • 0.2.0-next.17bdb70
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9K
decreased by-19.21%
Maintainers
1
Weekly downloads
 
Created
Source

Langium CLI

This package provides a command line interface for Langium.

Usage: langium [options] [command]

Options:

  • -V, --version — output the version number
  • -h, --help — display help for command

Commands:

  • generate [options] — generate code for a Langium grammar
  • help [command] — display help for command

Generating Language Infrastructure

The main purpose of this tool is to generate the infrastructure for a language from its grammar declaration file. This command requires a configuration file (currently embedded in the package.json of your package).

Usage: langium generate [options]

Options:

  • -f, --file <file> — the configuration file or package.json setting up the generator
  • -h, --help — display help for command

Configuration

The configuration for the generate command is currently embedded in the package.json.

Schema:

langium: {
    // The identifier of your language as used in vscode
    languageId: string
    // Path to the grammar file
    grammar: string
    // File extensions with leading `.`
    extensions: string[]
    // Main output directory for TypeScript code
    out: string
    // Enable generating a TextMate syntax highlighting file
    textMate: {
        // Output path to syntax highlighting file
        out: string
    }
}

Example:

{
    "name": "domainmodel",
    "version": "0.0.1",
    ...
    "langium": {
        "languageId": "domain-model",
        "grammar": "src/language-server/domain-model.langium",
        "extensions": [".dmodel"],
        "out": "src/language-server/generated",
        "textMate": {
            "out": "syntaxes/domain-model.tmLanguage.json"
        }
    }
}

Keywords

FAQs

Package last updated on 18 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc