node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

Switch binary build/cache to prebuild

Open nschonni opened this issue 5 years ago • 4 comments

Came across this while looking around at options for the Electron building

  • For creating the builds https://github.com/prebuild/prebuild
  • To replace our custom caching/download https://github.com/prebuild/prebuild-install
  • Sample project that is setup with this https://github.com/lovell/sharp

I'll try to kick the tires a bit, but is it worth trying to change for the next release or wait till after?

nschonni avatar Sep 30 '20 00:09 nschonni

@lovell sorry for the random ping, but I was wondering if there have been any "gotchas" with your setup? EX: problems with proxies etc...

I think it looks like a pretty solid option to drop our custom setup 😄

nschonni avatar Sep 30 '20 02:09 nschonni

I'm very happy with the choice and use of prebuild, so it's a +1 from me.

People are always going to misdirect complaints about badly-configured corporate proxies towards open source maintainers, so that noise never really goes away, sorry.

Before you do this I highly recommend migrating from nan to N-API via node-addon-api and only support one version of N-API at a time (e.g. sharp only provides N-API v3), which then means you no longer require separate electron binaries or need to "rebuild".

lovell avatar Sep 30 '20 09:09 lovell

@lovell appreciate the response! @xzyfer had taken a look at the N-API stuff a little while ago with https://github.com/sass/node-sass/pull/2440, but I'd like to just do an initial cutover and cleanup of our custom binary distribution first. It definitely does seem like a better way to go though.

I noticed that your repo is licensed under Apache 2. Do you need some sort of license distribution or is an acknowledgement OK if I try to base a new binary setup based off your pattern there?

nschonni avatar Sep 30 '20 22:09 nschonni

@nschonni Please feel free to borrow as much as you can from sharp. Apache 2.0 is permissive so derivatives can use a different licence, but yes, attribution is still required, thank you.

lovell avatar Sep 30 '20 23:09 lovell