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 was 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
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.jsit'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 --pathsIf you agree with this I'll implement it.