dependents / Dependents

Navigate front-end codebases in Sublime Text 2/3
Other
41 stars 5 forks source link

Paths instead of Root #135

Open dkebler opened 9 years ago

dkebler commented 9 years ago

Enhancement:

With many potential dependencies living within bower packages and elsewhere maybe a better notion than setting a root is an array of paths.

For example with sass instead of

  {
    "sass_root": "/a/path/scss/" 
  }

  {
   "sass_paths":[
                  {"order":"1", "sass_path":"/a/primary/path/scss"},
                 {"order":"2", "sass_path":"/a/path/to/package/scss"}
                   ]
    }

then dependents looks by priority "order" in the the given paths (including subdirectories) until it gives up. This allows one to have their scss code in different places throughout the project. I assume it would the same for js.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mrjoelkemp commented 9 years ago

Great idea. I think deprecating "sass_root" and replacing it with "sass_paths" is a good option. It should be a list of paths. The priority would be dictated by the order of the elements within the array; no need for the "order" attribute in that case.

Something like:

"sass_paths": [
  '/a/primary/path/scss',
  '/a/path/to/package/scss'
]