logoalt Hacker News

madeofpalkyesterday at 6:28 PM2 repliesview on HN

You don't need post-install scripts for this. Use optionalDependencies instead https://github.com/nrwl/nx/blob/master/packages/nx/package.j...

Each of those deps contains a constraint installing only for the relevant platform.


Replies

mookyesterday at 7:32 PM

As far as I can understand from the documentation, that doesn't actually specify in that config that one of them is required, does it? That is, if they _all_ fail to install as far as the system is concerned there's nothing wrong? There will be runtime errors of course, but that's sort of disappointing…

halflifeyesterday at 6:33 PM

That’s cool, now I wish all libraries that need binaries would opt to use that instead of post script

show 1 reply