Closed monteslu closed 11 years ago
This would also allow for other properties to be added in the future per dependency. It would also help solve an issue I am encountering with the dojo build process in which I use Volo to add lodash, but it is extracted to baseUrl/lodash.js and the build breaks by trying to crawl all nested directories in baseUrl/. This would allow me to nest lodash 1 directory deeper.
+1!
I have a case where non of the 3rd party libs I'm using are stored in my repo, instead they're all fetched with a volo add
command on project installation.
Problem is if one of these libs was added with depends
or exports
options, the package.json doesn't "know" about it, so the next time someone runs volo add
the code will simply break.
Ideally, these modules would define their own packages for usage with volo so this would never be a problem, but when dealing with purists it just doesn't work.
Marking for consideration in 0.3.0
@ydaniv your situation should be solved by adding the depends and exports to the https://github.com/volojs/repos overrides repo. That way it benefits all consumers of that lib.
For the other cases, I do not see a need for multiple baseUrls, you can just specify the install location when installed. So, if you wanted lodash installed under the baseUrl somewhere else:
volo add lodash some/subdir/lodash
Should place the dependency at baseUrl + 'some/other/lodash'.
So going to close as I think this is workable as-is, but feel free to continue discussion here.
The current volo object in package.json uses only one baseUrl. I have a case where it would be nice if we could optionally specify a baseUrl per dependency.
Perhaps the value of each property in the "dependencies" object could optionally be an object instead of a url string, and that object could have url(or some other name) and baseUrl properties.