Home Download Buy Blog Forum Support

per-project-builds

per-project-builds

Postby iamntz on Wed Feb 27, 2013 3:51 pm

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

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

Image

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

Code: Select all
{ "keys": ["ctrl+shift+b"], "command": "build_selector" }


in your keymap file.

That's it. I hope will be useful to someone else too :ugeek:
iamntz
 
Posts: 914
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: per-project-builds

Postby Grant on Thu Feb 28, 2013 2:35 pm

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).
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

Re: per-project-builds

Postby iamntz on Thu Feb 28, 2013 3:01 pm

@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:
Code: Select all
   "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 :)
iamntz
 
Posts: 914
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: per-project-builds

Postby bizoo on Thu Feb 28, 2013 3:28 pm

Why don't you use variants ?

And add a keybinding to open the menu:
Code: Select all
{ "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.
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: per-project-builds

Postby iamntz on Thu Feb 28, 2013 3:55 pm

Why don't you use variants ?


I tried, see here: viewtopic.php?f=3&t=10559&p=41660

Unfortunately i wasn't able to understand how it works. But no problem, i learned a little more python :ugeek:
iamntz
 
Posts: 914
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: per-project-builds

Postby bizoo on Thu Feb 28, 2013 4:13 pm

iamntz wrote:
Why don't you use variants ?


I tried, see here: viewtopic.php?f=3&t=10559&p=41660

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

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 ;)
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 8 guests