When building a jQuery plugin, do you think it’s bad practice to embed the source of another plugin or library that it depends on?
It seems to me that it’s a better way to go than requiring users to do multiple <script src="..."> calls or compressing the multiple source files themselves.
I would stay away from embedded in most cases, especially if you’re depending on another jQuery plugin. Some cases to consider:
There are few upsides to this besides saving a few
<script>tags, which should be cached on the client anyway…and in my case as well as many others (like SO) the scripts get compressed into one or a few requests.Most jQuery plugins require dependencies to be added with their own
<script>tags, in this case by not going with what most do serves more to confuse or complicate rather than save time. Personally, I’d stay away from the embedding, but to each their own.