medialab / artoo

artoo.js - the client-side scraping companion.
http://medialab.github.io/artoo/
MIT License
1.1k stars 93 forks source link

Indroduce bower package #254

Open vladimirnani opened 7 years ago

vladimirnani commented 7 years ago

How about introducing bower package? I find it very useful, for example for using artoo in my chrome extension i had to clone and build with gulp artoo.chrome.js. Whereas having bower component would be much more convenient.

Yomguithereal commented 7 years ago

Isn't npm suitable?

vladimirnani commented 7 years ago

It is suitable, but i just wonder how better organize, because in my chrome extension I have bower as package manager for client side modules.

Yomguithereal commented 7 years ago

I am not opposed to publish to bower but the issue is that bower forces the developer to have a built version of the code in the repository and this is quite cumbersome. Do you know a way not to have to keep built version in the repository?

vladimirnani commented 7 years ago

I think the way to go is to have a publish task in travis. Also agree that having built version in repo is cumbersome. I could investigate how we can do it.

Deployment Travis

vladimirnani commented 7 years ago

Good example how it can be done: Publishing Angular Autowrap to npm, bower and GitHub Releases from Travis-CI

Yomguithereal commented 7 years ago

Can bower target releases? In this case I could just upload the built code in the release files.

vladimirnani commented 7 years ago

Hm not sure, it can target git tags. Is that sufficient?

Yomguithereal commented 7 years ago

Plus the other issue is which endpoint of the library are you using to properly load the code in your extension?

vladimirnani commented 7 years ago

The way I see it is like bower-angular-animate. And we would list build output here. Bower user will specify which endpoint of library he needs. In my case i would install bower-artoo-js and use only artoo.chrome.js.

Yomguithereal commented 7 years ago

The sad thing is that npm already perform this job very well and bower applies a lot of pressure to the repositories by obliging developers to make silly things as proxy repos :-)

Your issue is that you need to ship the code with the extension I guess and that bower, by downloading the code where you need, facilitates this? But why not use a bundler like browserify or webpack to perform the same job?

vladimirnani commented 7 years ago

Ok. Yes agree, these proxies seem to be redundant. Maybe it is time to switch to npm + webpack from bower + gulp.

Yomguithereal commented 7 years ago

But if the cost is too high for you to change, I can wrap a bower version very fast. Just tell me if you really need it.

vladimirnani commented 7 years ago

No problem for me to switch. Thanks. Lets just wait if there will be anybody thats really needs that, otherwise close issues.

duongtdvn commented 7 years ago

I'm also interested in bower package.

waleedsamy commented 7 years ago

+1

Yomguithereal commented 7 years ago

I'll try to do that soon. Ping me if I forget.