Home Download Buy Blog Forum Support

Alternative Build Systems

Alternative Build Systems

Postby bknights on Wed Jul 10, 2013 10:09 pm

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?
bknights
 
Posts: 2
Joined: Wed Jul 10, 2013 10:04 pm

Re: Alternative Build Systems

Postby bknights on Wed Jul 10, 2013 10:13 pm

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?
bknights
 
Posts: 2
Joined: Wed Jul 10, 2013 10:04 pm

Re: Alternative Build Systems

Postby bizoo on Thu Jul 11, 2013 7:01 am

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:
Code: Select all
Build: Variant 1
Build: Variant 2

In addition, you can create keybinding to show the Command Palette already filtered:
Code: Select all
{ "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:
Code: Select all
{ "keys": ["ctrl+shift+b"], "command": "build", "args": {"variant": "Run"} },
bizoo
 
Posts: 873
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Alternative Build Systems

Postby iamntz on Thu Jul 11, 2013 4:44 pm

iamntz
 
Posts: 897
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania


Return to Technical Support

Who is online

Users browsing this forum: Alexa [Bot], Google [Bot] and 27 guests