nicosantangelo / sublime-gulp

Run Gulp tasks and use snippets from Sublime Text
https://sublime-gulp.nicosantangelo.com/
MIT License
155 stars 18 forks source link

Limit search to the nearest gulpfile #98

Closed mrsean2k closed 4 years ago

mrsean2k commented 4 years ago

It would be useful to have a variant where the tasks in the gulpfile that relate only to the source file currently in focus for editing are listed.

Ideally this would involve:

  1. If a file is in focus and being edited, check for a gulpfile in the same directory
  2. If no such file exists, recursively ascend parent directories and check for a gulpfile in each
  3. If no such file exists, fall back on the existing search for gulpfiles

Obviously stop as soon as any match is found, and present that gulpfile's tasks

nicosantangelo commented 4 years ago

I agree this would be a good addition. Sadly I'm not currently using Gulp and the project is somewhat stable as-is so I don't think I'll be adding code for something like this in the near future.

I'm open to reviewing, merging and deploying PRs though!

Thanks a lot for the suggestion

mrsean2k commented 4 years ago

Thanks @nicosantangelo for the plugin as - is - it's very useful - and scratching your own itch is always good advice :)

In the end I use this in combination with https://packagecontrol.io/packages/ProjectManager to achieve the effect I was after.