budgielang / VSCode-GLS-Colorizer

Visual Studio Code extension that adds language support and syntax colorization to .gls files.
2 stars 0 forks source link

Create a build system to generate list of commands #1

Open Ben-Wolf opened 7 years ago

Ben-Wolf commented 7 years ago

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.

JoshuaKGoldberg commented 7 years ago

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.