Bjornej / GruntLauncher

A vspackage that adds the possibility to launch Grunt tasks
MIT License
40 stars 11 forks source link

Grunt Targets #16

Closed LeoColomb closed 10 years ago

LeoColomb commented 10 years ago

Hi @Bjornej,

It should be super useful (if possible) to recursively get Grunt tasks. Here I mean get sub tasks such as task:subtask, when there are two or more subtasks.

All Grunt tasks should respect the following structure.

{
  taskA: {
    sub1: {
      ...
    },
    sub2: {
      ...
    },
    options: {
      ...
    }
  }
}

Currently taskA is well recognize and added to the Grunt submenu. You may also add sub1, sub2 (options is the common sublist to set options, so not a task) inside a taskA submenu.

What do you think about this? :smiley:

Bjornej commented 10 years ago

Hi @LeoColomb ,

your suggestion is easy to implement and I'll try to have a version ready to try tomorrow but I need some more info as I've not used subtasks much:

LeoColomb commented 10 years ago

Referring to the Grunt documentation:

LeoColomb commented 10 years ago

Just see what I name sub-tasks are actually named targets. More relevant...

Bjornej commented 10 years ago

I've done it. Can you try this version and confirm it's working as you suggested?

LeoColomb commented 10 years ago

Perfect for the parsing behavior. :ok_hand: About how to show this, it could be more impressive to add a submenu. Quick example: k

Bjornej commented 10 years ago

It's a nice idea but I'll have to see if I can do it.

Visual studio way to define menus is static and defined in a xml file so I'll have to see if it can be made dynamic in some way.

Let me make some experiments and I'll tell you if it's possible

LeoColomb commented 10 years ago

@Bjornej Thanks! Feel free to submit me some packages to test (and check errors) :smile:

Bjornej commented 10 years ago

I've tried to create the submenus for the multiple targets command but it doesn't seem to be possible with the way menus are defined in visual studio.

I'll change the labels to remove grunt in the submenu and make a last try to implement it. If it doesn't work I''l publish the new feature on visual studio gallery so at least this is available to everyone.

Bjornej commented 10 years ago

I've tried again but I'm not able to dynamically create the submenus.

I've integrated your pull request and solved another bug which didn't allow to use a gruntfile except at the root of the project. If you want to try the prerelease it is here.

Tomorrow I'll make some other tests then publish the updated version on the gallery.

After that I'll close this issue if it's okay with you

LeoColomb commented 10 years ago

OK, perfect. I will also try on my side to do what I suggest when I will have some time. Thanks again!