dunnkers / ember-polymer

Use Polymer in your ambitious Ember application! 💎
https://dunnkers.github.io/ember-polymer/
MIT License
21 stars 6 forks source link

fix(scraper): Add check for pkg existance. #85

Closed PabloHidalgo closed 6 years ago

PabloHidalgo commented 6 years ago
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling dab6dff1c4f1bb5a8c35a8d4699de395b99af665 on PabloHidalgo:fix/check-missing-pkg into fa60c3554dee8275c9c1b7dbc037dbb0e2f87c69 on dunnkers:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling fb5e16983a8d0f27db46b40d1585f8dcbbbd24ea on PabloHidalgo:fix/check-missing-pkg into fa60c3554dee8275c9c1b7dbc037dbb0e2f87c69 on dunnkers:master.

dunnkers commented 6 years ago

Thanks for the PR! - good to see people using my addon.

As for checking whether pkgPath exists; the code relied on the assumption that every npm- or bower package specified the addon-consuming project has a bower.json or package.json specified in its folder root itself, since it is imported via that file. Actually, how does the blueimp-canvas-to-blob package not have a package.json defined in its folder root? 😅

Anyhow, it does make good sense to add a check to prevent the entire build failing in this very rare case where a project doesn't have its npm- or bower file defined. ✌🏻 Merged.

PS - please star ⭐️ the repo if you like it! Cheers.

PabloHidalgo commented 6 years ago

Hi @dunnkers,

As you state, there are very rare cases where the 3rd party dependency doesn't contains a package/bower file, I found it on a few plugins we use on our application (doesn't remember right now), but as it's something we can't handle...better to prevent the build failing!

Thanks for your good work on the addon and your fast answer to the PR :)

BTW: Thanks for code review too!!