Home Download Buy Blog Forum Support

Target option in build system

Target option in build system

Postby Marciano on Thu May 19, 2011 1:55 pm

A question for JPS: if I set the "target" option in a build system to my own custom command, will that command receive the other build options (e.g. env, etc.)? Does the signature of the custom command have to be the same as that of exec? Thanks!
Marciano
 
Posts: 146
Joined: Fri Sep 18, 2009 2:55 am

Re: Target option in build system

Postby guillermooo on Thu May 19, 2011 2:07 pm

In case it helps, here's a custom command for the "target" element:

https://bitbucket.org/guillermooo/aaapa ... v.py#cl-91

Basically, you should be able to access all args through **kwargs.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Target option in build system

Postby Marciano on Thu May 19, 2011 8:58 pm

Perfect, just what I needed! Thanks!
Marciano
 
Posts: 146
Joined: Fri Sep 18, 2009 2:55 am

Re: Target option in build system

Postby Marciano on Fri May 20, 2011 2:56 am

...and, even better, any named function argument that corresponds to an option in the .sublime-build file gets passed automagically. Cool!
Marciano
 
Posts: 146
Joined: Fri Sep 18, 2009 2:55 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 9 guests