You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
The main field in Bower can be a string or an array, so I would suggest that in case the main is an array the tag would pick the first item in the list. If passed in argument is packagename/file.js it'll look for that file in the array and output the path to the file. If main is just a string the filename after the slash will be matched against that file and if it doesn't match an error will be raised.
To get a listing of all the files do: bower list --paths
If you agree with this I'll implement it.
The text was updated successfully, but these errors were encountered:
There would probably have to be a keyword argument for the base path to bower folder with the default being bower_components. Just in case one app has decided to put it in some other location.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
One thing I noticed with jQuery switching the path to where the main file is located is that currently things are kind of brittle.
If a library changes the location you've to go in and change the includes to get it working again.
So I suggest a tag working like this:
{% bower 'packagename' 'fallback-path-if-no-main' %}
Ex:
{% bower 'jquery' 'jquery/dist/jquery.js' %}
The main field in Bower can be a string or an array, so I would suggest that in case the main is an array the tag would pick the first item in the list. If passed in argument is
packagename/file.js
it'll look for that file in the array and output the path to the file. If main is just a string the filename after the slash will be matched against that file and if it doesn't match an error will be raised.To get a listing of all the files do:
bower list --paths
If you agree with this I'll implement it.
The text was updated successfully, but these errors were encountered: