Sublime Forum

Per-project-builds

#1

Because i kinda needed this, i created this small plugin!

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

And because i hate when a plugin will overwrite my key bindings, this is not include any such things, so you need to add

{ "keys": "ctrl+shift+b"], "command": "build_selector" }

in your keymap file.

That’s it. I hope will be useful to someone else too :ugeek:

0 Likes

#2

FYI, Have you checked out MultiTaskBuild?

I never got the officially supported variant building to work successfully in ST2, but this plugin got me through (even before it was introduced).

0 Likes

#3

@Grant: I searched for a plugin before. I didn’t found one that works based on project settings, all works only on one main setting file.

My project config looks like this:

	"build_systems":
	
		{
			"name": "Grunt Tasks:ALL",
			"shell_cmd": "grunt --no-color",
			"working_dir": "${project_path}"
		},
		{
			"name": "Grunt Tasks:CSS",
			"shell_cmd": "grunt css --no-color",
			"working_dir": "${project_path}"
		},
		{...},
		{...}
	],

And that’s it. No extra configs, no extra nothing :smile:

0 Likes

#4

Why don’t you use variants ?

And add a keybinding to open the menu:

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

The only drawbacks are:

  • Build: Build Cancel always appear in them menu even when no build is running (bug ?).
  • Build: Build couldn’t be renamed.
0 Likes

#5

I tried, see here: Per project build variants

Unfortunately i wasn’t able to understand how it works. But no problem, i learned a little more python :ugeek:

0 Likes

#6

[quote=“iamntz”]

I tried, see here: Per project build variants

Unfortunately i wasn’t able to understand how it works. But no problem, i learned a little more python :ugeek:[/quote]

You can simply put these build_systems in your project and choose “grunt tasks” from the Build system to always use them.
Or you can set a “scope” like “source.js” to these build_systems and choose “Automatic” from the Build system menu.
Both must works.

But learning Python is fun :wink:

0 Likes