Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The one line pitch,
paths
are aliases likemain
for subassets.We've discussed this a bunch of times without putting forward any action. This has been on my wishlist for a while. Its definitely a new "feature" unlike
main
which has actually existed since the beginning.main
serves the majority of packages well that offer a simple single entry point into the package. However, theres a class of packages that want to expose many submodules to the user in a nice way. If you care about the ascetics of paths, you are forced to put all your assets at the root of the package. This is not ideal.I'll use bootstrap as an example from here on.
The syntax here is much like RequireJS's
paths
config. However, we need to be clear about file extensions since we aren't just deal with.js
. Heres how grunt-bower-requirejs would interpret this config and autogenerate the following.Resources
lib/
orsrc/
.feature-detects
. It might be nicer to expose them asmodernizr/geolocation
etc.