taptapship / wiredep

Wire Bower dependencies to your source code.
MIT License
1.15k stars 142 forks source link

Enhanced placeholders #166

Closed Marabyte closed 9 years ago

Marabyte commented 9 years ago

It would be nice to have enhanced placeholder tagging so we could specify which bower dependencies are injected, ie : The user wants modernizr to be injected on the head and all other js files in the footer

<head>
<!-- bower:js modernizr -->
<!-- endbower --> 
</head>
<body>
<rest of my code>
<!-- bower:js modernizr -->
<!-- endbower --> 
</body>

Or another exemple : inject aight inside IE conditional comments:

 <!--[if lte IE 8]>
<!-- bower:js aight -->
<!-- endbower --> 
<![endif]-->

The name after bower:js would have to match against bower.json and could be comma separated for multiple injections ie: or use a star selector : (angular-animate, angular-resource, etc)

sixertoy commented 9 years ago

+1

stephenplusplus commented 9 years ago

Thank you for the suggestion! I think supporting this would add a lot of overhead for the library to maintain, but I more disagree with its usefulness. If you're spending time formatting comments how a build tool expects, why not just inject the references yourself?

If you can prove me wrong with a PR or with more use cases how this could benefit folks, please feel free :)