I am working on a JavaScript library (bitcoin-prices.js) which I'd like to maintain using browserify. The library depends on jQuery. I would not like to force the library users move to browserify, but retain "drop one file + script tag" integration for those who have not drank the latest koolaid from JavaScript community.
My question is how to create a bundle.js with browserify, so that
browserify-enabled users can install the package from NPM, having proper jQuery dependency
Traditional users can as still use
<script>
tag drop in bundle, loading their jQuery wherever they want to with another<script>
and the code still works fine
I guess some kind of boilerplate code is needed around $ = require('jquery.js')
?