Skip to content

Instantly share code, notes, and snippets.

@locks
Last active December 17, 2015 17:59
Show Gist options
  • Save locks/5650299 to your computer and use it in GitHub Desktop.
Save locks/5650299 to your computer and use it in GitHub Desktop.

Hi,

I want to add documentcloud/underscore-contrib to Bower, but I'm not sure what is the best way to go about it.
Could you provide some guidance please? My current effort is at locks/underscore-contrib-shim.

I have checked components/underscore and a few other repositories to see common patterns, but there are a few considerations:

  • The library maintainer prefers to distribute the file separately, so the user can require just what he needs.
  • For the node.js package this was the solution developed.
  • I also saw on an Issue that you would prefer there to be a 'built' file.

Thank you for your time.

@locks
Copy link
Author

locks commented May 29, 2013

sindresorhus: @locks that's how I would do it. Built doesn't mean concatenated. Though might want to have a separate package for each, ...
sindresorhus: @locks ... which would be painful today as it would require a separate repo for each. We're working towards being able to publish like npm.

@necolas
Copy link

necolas commented May 30, 2013

I thought Jeremy basically didn't want to explicitly support client-side package managers at this time. Otherwise, you'd just need to get the project to include the bower.json file from your shim, and that's it.

Reading this - http://blog.fogus.me/2013/04/25/announcing-underscore-contrib/ - it seems that their recommendation for client-side use is to explicitly reference each individual module you want to use. It would have been nice if they were standalone packages.

I also saw on an Issue that you would prefer there to be a 'built' file.

I closed that issue because I don't think people should do that. That's an anti-pattern that we shouldn't be encouraging specifically for Bower, just because Bower doesn't handle that use case adequately at the moment.

Eventually, it will have an npm-style publishing model too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment