msurdi / frontend-dependencies

Copies node packages to a directory where your frontend tools will be able to find them
24 stars 5 forks source link

Skip optional dependencies #10

Closed vakata closed 5 years ago

vakata commented 5 years ago

We can not skip all dependencies, but at least optional ones (for example fabric tries to install canvas, which is not needed)

msurdi commented 5 years ago

Hi @vakata , thanks a lot for your PR.

Do you think it would make sense to add a new setting to control this behavior? I wonder if changing this would break other user's projects.

@FelixFurtmayr , you've done a lot of work on this project, do you have any opinion on this?.

Thanks both of you for your help!

FelixFurtmayr commented 5 years ago

Hi guys,

I think this is a good idea. Thanks for the suggestion. As we don't use the modules as classic node modules (with "require") and just copy some files from them, we need no dependencies. Skipping some dependencies will make the code faster. I would just do this step.

Yes, it would probably break some code: If someone used dependencies of the modules (which was at least not my intention - keep it simple) and if the error handling of optional dependencies in his code was not done right. If anybody has this problem, he might just fix his code, or tell us.

Regards

Felix

vakata commented 5 years ago

Hi guys,

Thank you for merging.

I loved the simplicity of the plugin and I created a PHP port of this plugin (for using with composer): https://packagist.org/packages/vakata/frontend-dependencies I hope that is OK? If not - I will bring it down.

Best regards,

FelixFurtmayr commented 5 years ago

Hi vakata,

I'm fine with that. I guess msurdi will also be. I'm happy if the code could help you. If you have another improvement - we are happy to receive your pull request.

Regards, Felix

msurdi commented 5 years ago

That's absolutely fine. I'm very happy you've found the idea useful.

vakata commented 5 years ago

@FelixFurtmayr , @msurdi - that is great news - thank you for the wonderful plugin.