Skip to content
This repository has been archived by the owner on Nov 26, 2018. It is now read-only.

feature: traverse whole source tree when findig Gruntfile.js or .coffee #56

Closed
wants to merge 1 commit into from
Closed

Conversation

encero
Copy link

@encero encero commented Dec 19, 2013

In my project i have located Gruntfile.js in subfolder. So this minor change make selecting of desired Gruntfile.js possible.

@VirtueMe
Copy link
Collaborator

This would not work for the caching bits as that only checks the .js file

@VirtueMe
Copy link
Collaborator

Playing around with this i got

Quick panel unavailable

I have a fix for the expose method to allow coffee caching. I also found a path around the error message, but is this really something we want to do? It adds another selection before we can run our command. It would have been better if the grunt tasks got listed by path down the quick panel.

@tvooo
Copy link
Owner

tvooo commented Dec 21, 2013

I am not really fond of this feature implemented that way.
I understand the need for some setups to use Gruntfiles in a sub directory, but just walking the directory structure doesn't seem to be the way to go.
Just look at a project with lots of NPM dependencies. It will give you a list with all the Gruntfiles of all the NPM packages. Nope, not a good idea.

I would rather suggest to make this configurable, while I am usually more a friend of convention. But what about an optional sublime-grunt.config file in the root dir? Any opinions?

@panuhorsmalahti
Copy link

I'd go with a configuration option. My project includes lots of Gruntfiles, but I only need to run a certain Gruntfile from Sublime.

@alexlangberg
Copy link

Why not make it work like the git plugins and make the command work relatively to the currently open file instead?

Like,

  1. Look for Gruntfile in same folder as current file.
  2. Look for Gruntfile in subfolders of directory of current file.
  3. Look for Gruntfile a level (or a few levels) above the folder of the current file.

This way you don't need configuration either.

@lefoy
Copy link
Contributor

lefoy commented Jul 22, 2014

+1 for configuration file (sublime-grunt.config) with Gruntfile path

@mtone
Copy link

mtone commented Jul 24, 2014

I now have my gruntfile.js in a subfolder, since then I must resort to the sublime build system. I expected I would be able to use something like:

{
    "exec_args": {
        "path": ".\\subfolder"
    }
}

where "." would be the root project folder. Alas it doesn't work, relative or aboslute.

Edit: Thanks to lefoy for clarifying the path can't be used to specify the gruntfile location.

@lefoy
Copy link
Contributor

lefoy commented Jul 24, 2014

The path settings is not for the Gruntfile, it's your system PATH variable. Example:

{
    "exec_args": {
        "path": "/bin:/usr/bin:/usr/local/bin"
    }
}

@Podders
Copy link

Podders commented Aug 5, 2014

Another +1 for the config file, wordpress dev is the prime use case for this, Gruntfile would naturally be placed in the theme directory, not the project root.

@dominik0711
Copy link

+1 for configuration file (sublime-grunt.config) with Gruntfile path

@tvooo
Copy link
Owner

tvooo commented Sep 9, 2014

Sorry for the long delay! I'm quite busy these past weeks and months. I think I will implement the config file solution as soon as I've got time. Any help (pull requests) will of course be greatly appreciated!

@tvooo
Copy link
Owner

tvooo commented Feb 7, 2015

The config file solution was implemented in another PR, using the general Sublime Text or sublime-project config file.

@tvooo tvooo closed this Feb 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants