Open bradley-holt opened 7 years ago
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
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.
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?
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!
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 ¯\_(ツ)_/¯
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.
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:bower.json
file.bower.json
.Step 4 could be a blocker, as there appears to be third party dependencies that are not already packaged up as Bower components.