passy / google-cdn

Replaces references to resources on the Google CDN
BSD 3-Clause "New" or "Revised" License
70 stars 34 forks source link

Don't depend on whole of `bower` #27

Open sindresorhus opened 9 years ago

sindresorhus commented 9 years ago

The dependency is absolutely massive. Currently this module with dependencies takes up 54 MB!

Instead just spawn the global bower CLI.

Related to https://github.com/btford/grunt-google-cdn/issues/62

passy commented 9 years ago

While the reasoning behind is obviously correct I really dislike the ugly work-around needed to solve a problem npm should solve for us. Especially because this brings all sorts of nasty problems with it. What if bower is not on the PATH we run this in? How do we verify that the version is compatible? How do we handle all the OS-specific errors spawning the process and piping the output brings with it?

sindresorhus commented 9 years ago

You're only using Bower to get the main entry, so you could just use https://github.com/bower/json directly.

passy commented 9 years ago

Yeah, with that I'd be totally cool.