Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a build system to generate list of commands #1

Open
Ben-Wolf opened this issue Nov 17, 2016 · 1 comment
Open

Create a build system to generate list of commands #1

Ben-Wolf opened this issue Nov 17, 2016 · 1 comment
Assignees

Comments

@Ben-Wolf
Copy link
Collaborator

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.

@Ben-Wolf Ben-Wolf self-assigned this Nov 17, 2016
@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Nov 30, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants