gls-cli

Node CLI for General Language Syntax (GLS).


Keywords
general, language, syntax, gls, cli, csharp, java, javascript, metaprogramming, node, npm, oop-languages, python, ruby, typescript
License
MIT
Install
npm install gls-cli@0.2.0

Documentation

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.