Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package hoodie-client for Bower #142

Open
bradley-holt opened this issue May 21, 2017 · 7 comments · May be fixed by #143
Open

Package hoodie-client for Bower #142

bradley-holt opened this issue May 21, 2017 · 7 comments · May be fixed by #143

Comments

@bradley-holt
Copy link

I would like to be able to install hoodie-client via Bower. See the instructions for creating bower packages for reference. In my understanding, this would include:

  1. Creating a bower.json file.
  2. Registering dependencies in bower.json.
  3. Registering the package with Bower.
  4. Repeating these steps for all dependencies that aren't already packaged up for Bower.

Step 4 could be a blocker, as there appears to be third party dependencies that are not already packaged up as Bower components.

@bradley-holt bradley-holt linked a pull request May 21, 2017 that will close this issue
@gr2m
Copy link
Member

gr2m commented May 22, 2017

bower is deprecated as far as I know. And it’s problematic because we need to commit built files to the repository. What’s your use case? Install via npm should usually work

@bradley-holt
Copy link
Author

I believe Bower is still supported, though I agree that npm is being used more widely these days for frontend dependencies. The use case is that I'm building a workshop based on the Polymer Shop app. This app uses Bower to install dependencies. For now, I'm simply loading the Hoodie client from the Hoodie server. However, it would be nice to be able to treat the frontend app as its own independent app with its own dependencies.

@gr2m
Copy link
Member

gr2m commented May 25, 2017

I think bower can install directly via a URL, you can use this one: https://unpkg.com/@hoodie/client@10.0.2/dist/hoodie.js

It is the built version of @hoodie/client. Does that work?

@bradley-holt
Copy link
Author

This does not seem to work:

$ bower install --save https://unpkg.com/@hoodie/client@10.0.2/dist/hoodie.js
bower                     ENORESTARGET URL sources can't resolve targets

Nor any variation such as:

$ bower install --save https://unpkg.com/@hoodie/client
bower                     ENORESTARGET URL sources can't resolve targets

However, installing directly from GitHub seems to work:

$ bower install --save https://github.com/hoodiehq/hoodie-client.git
bower hoodie-client#*       not-cached https://github.com/hoodiehq/hoodie-client.git#*
bower hoodie-client#*          resolve https://github.com/hoodiehq/hoodie-client.git#*
bower hoodie-client#*         download https://github.com/hoodiehq/hoodie-client/archive/v10.0.2.tar.gz
bower hoodie-client#*          extract archive.tar.gz
bower hoodie-client#*         resolved https://github.com/hoodiehq/hoodie-client.git#10.0.2
bower hoodie-client#^10.0.2    install hoodie-client#10.0.2

This should be good enough as a work around. Thanks!

@gr2m
Copy link
Member

gr2m commented May 25, 2017

note that we don’t have the built version of @hoodie/client in the github repository which bower usually needs (and why we moved away from bower in the first place).

Telling from their own docs at https://bower.io/docs/api/#install, bower install https://unpkg.com/@hoodie/client@10.0.2/dist/hoodie.js should just work ¯\_(ツ)_/¯

@bradley-holt
Copy link
Author

I saw some talk of a potential bug with Bower that could explain why the install from unpkg didn't work, but I didn't spend a ton of time exploring that. Oh well. This should work for now. Hopefully Polymer moves away from using Bower in their application templates and demos.

@bradley-holt
Copy link
Author

For reference: Polymer/polymer#326 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants