eugeneware / debowerify

A browserify transform to enable the easy use of bower components in browserify client javascript projects. This can be used in conjunction with deamdify to require AMD components from bower as well.
491 stars 51 forks source link

When a component's "main" is an array, use the first item in the array #2

Closed 00dani closed 11 years ago

00dani commented 11 years ago

bower.json defines the main option as (validly) being either a string or an array. debowerify previously assumed that main was always a string, so valid Bower components that chose to use an array instead would produce a TypeError. This patch has debowerify test the content of main, and if it's an array it will instead use the first element of the array.