Sublime Forum

Alternative Build Systems

#1

Hello, I am wondering if it is possible to have multiple build systems for a file type with only one of those being automatic?

Reason:
I have jslint for javascript files. I’d like that to be the automatic build system for source.js
I have just added the YUICompressor as a build system. Now that is the automatic build for source.js. I’d like this one to be run only if I do so manually.

Is this supported?

0 Likes

#2

Actually this works if I just remove the selector for the the YUI Compressor build system. Now it only runs when manually selected. Now the question is "Is there a way to have multiple build systems for a given selector and toggle/step through them with some key combination?

0 Likes

#3

Use variants:
http://docs.sublimetext.info/en/latest/reference/build_systems.html#variants

When you run the build, the default cmd is executed.
If you want to run a variant, you can select it with the Command Palette:

Build: Variant 1 Build: Variant 2
In addition, you can create keybinding to show the Command Palette already filtered:

{ "keys": "ctrl+alt+shift+b"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Build: "} }

You can also use a keybinding to run a specific variant:

{ "keys": "ctrl+shift+b"], "command": "build", "args": {"variant": "Run"} },
0 Likes

#4

Maybe this will help?

github.com/iamntz/sublime-per-project-builds

0 Likes