hiqdev / asset-packagist

Asset Packagist
https://asset-packagist.org
BSD 3-Clause "New" or "Revised" License
247 stars 24 forks source link

Add an option to ignore package dependencies #120

Closed artemkolotilkin closed 1 year ago

artemkolotilkin commented 4 years ago

I'd like to suggest to add an option for ignoring package dependencies. For example, I'm adding this npm package: npm-asset/typeahead.js and it supplements it with jquery. I don't really need jQuery as it comes pre-installed (in Drupal in my case).

I noticed that you are using a composer-asset-plugin to convert npm packages into composer packages. So most likely there needs to be an option there.

But what's interesting, the "Get ZIP" link on a package page actually downloads only the package without dependencies. So maybe it's possible to leverage that to provide a shallow version of a package, without dependencies. Maybe it can have a different type in that case. Something like npm-asset-shallow/typeahead.js or npm-asset/shallow-typeahead.js.

Looking forward to everyone's thoughts.

hiqsol commented 3 years ago

@artemkolotilkin Your thoughts are quite right. We've already discussed it before with same decision. But there is no one willing to implement such feature. And there is another potential problem. We are storing only the package meta information and it still a lot of disk storage. We've just moved to bigger server (VDS) because we've run out of space. And keeping twice more packages is roughly twice more disk storage which is not for free.