gls-cli
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

gls-cli

Build Status NPM version

Node CLI for General Language Syntax (GLS).

Usage

npm install general-language-syntax gls-cli ts-gls typescript gls-cli --global

gls --help

Pass any number of filenames and/or globs (matched with glob) to the CLI to convert those files to an output -l/--language.

Input files to convert from GLS to the output language must have a .gls extension.

.ts files may also be given with -t/--tsconfig to compile to .gls files before output language conversion.

Option Purpose
-e/--exclude Glob(s) of file(s) to exclude from conversion.
-l/--language Output language to convert to. (Required)
-t/--tsconfig TypeScript project configuration file. (Required if .ts file(s) given)
-v/--version Prints the GLS, GLS-CLI, and TS-GLS versions.

Example Usage

To convert file.gls to file.py:

gls --language Python file.gls

To convert *.ts to *.gls, then to *.java:

gls --language Java --tsconfig ./tsconfig *.ts

Requires Node >=8

Development

To build from scratch, install Node.js and run the following commands:

npm install
npm install general-language-syntax ts-gls typescript --no-save
npm run verify

Check package.json for the full list of commands. To set up source file compiling in watch mode, use tsc -p . -w.

Package Sidebar

Install

npm i gls-cli

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

134 kB

Total Files

89

Last publish

Collaborators

  • joshuakgoldberg