budgielang/VSCode-GLS-Colorizer

Create a build system to generate list of commands

Opened this issue · 1 comments

Create a build system that will have gls as a dependency to generate a list of commands that will be colorized.

The way that "http://aka.ms/gls-demo" does for its commands list.

A little more info on how this could be implemented...

The recent gls.tmLanguage at line 52 has a huge list of possible commands. Such a system, although necessary, is hard to update by hand or remember to update on every GLS update.

GLS' CommandsBag provides a getCommands that gives the full list of supported commands.

What you'll want to do is npm install gulp, create a simple gulpfile.js, and add a task to generate the output XML file based on a file from disk.

Some starter code:

const gulp = require("gulp");

gulp.task("default", () => {
    return gulp.src("syntaxes/gls.tmLanguage.format")
        .pipe(gulp.dest("syntaxes/gls.tmLanguage"));
});

You'll then be able to run gulp to generate the syntax file.