prebuildify icon indicating copy to clipboard operation
prebuildify copied to clipboard

make build tool independent

Open juliangruber opened this issue 8 years ago • 20 comments

no need to be limited to node-gyp :) I came up with this because a project I want to use this on uses cmake-js.

I tested this in https://github.com/voltraco/node-taglib2 so far, but it should work everywhere as node-gyp reads all its config also from the environment variables npm sets.

juliangruber avatar Jun 22 '17 15:06 juliangruber

This PR goes hand in hand with https://github.com/mafintosh/node-gyp-build/issues/4.

juliangruber avatar Jun 23 '17 06:06 juliangruber

Very cool. Did you test that this works on windows?

mafintosh avatar Jun 23 '17 06:06 mafintosh

not yet, will do

juliangruber avatar Jun 23 '17 06:06 juliangruber

I don't see anything that wouldnt work but you never know ... windows

mafintosh avatar Jun 23 '17 07:06 mafintosh

I tested this with taglib2 and it works :)

juliangruber avatar Jun 23 '17 14:06 juliangruber

@juliangruber So in order to use this, you would land this patch and run https://github.com/juliangruber/prebuildify-load ?

bcomnes avatar Aug 29 '19 12:08 bcomnes

@bcomnes That is outdated by now. We can instead add the missing functionality to node-gyp-build, provided that it doesn't need new dependencies.

vweevers avatar Aug 29 '19 12:08 vweevers

Sounds good

bcomnes avatar Aug 29 '19 12:08 bcomnes

Maybe a package rename is in order, but we can table that for now.

PR(s) welcome!

vweevers avatar Aug 29 '19 13:08 vweevers

Don't quite have a vision of what you mean, maybe if we write it up?

bcomnes avatar Aug 30 '19 07:08 bcomnes

To clarify, I thought it was okay to add functionality to the existing modules and that we could later choose to rename node-gyp-build to something more generic.

But on second thought, there's a fundamental difference between prebuildify-load and node-gyp-build that may in fact warrant the existence of prebuildify-load (which has a better name too). While node-gyp-build wraps node-gyp, prebuildify-load externalizes that. Compare:

"scripts": {
  "install": "node-gyp-build"
}
"scripts": {
  "install": "prebuildify-load || node-gyp build"
}

The latter approach avoids needing integration code specific to e.g. cmake-js.

If we can agree (@mafintosh @ralphtheninja) that this is the preferred approach, we could move prebuildify-load into the prebuild org and revive it, phasing out node-gyp-build.

vweevers avatar Aug 30 '19 08:08 vweevers

node-gyp-build is the only production dep needed to run the prebuildify stack, so we need to keep that extremely light (all the install speed comes from that package having no deps), so adding cmake there is prob a nogo. Making a new package for that use-case is fine

mafintosh avatar Aug 30 '19 09:08 mafintosh

@mafintosh My point was, with the approach of prebuildify-load, there's no need to add cmake.

vweevers avatar Aug 30 '19 09:08 vweevers

I don’t personally have a need or a valid perspective on this so I’ll abstain

bcomnes avatar Aug 30 '19 09:08 bcomnes

Old issue, but I think this makes sense actually. @vweevers should we revisit this?

mafintosh avatar Jul 20 '20 10:07 mafintosh

It's a good feature and doesn't add complexity. I'm for it, as long as it's semver-major because it will break prebuildify-cross.

vweevers avatar Jul 20 '20 11:07 vweevers

@vweevers i just registered the @prebuild org on npm (you should have gotten an invite). Then we could make a prebuild loader tool at @prebuild/load (i see julian's is archived)

mafintosh avatar Jul 20 '20 12:07 mafintosh

we could revive mine as well, I'm open to hand anything over

juliangruber avatar Jul 20 '20 12:07 juliangruber

@juliangruber Could you register your fork on npm so we can use it?

This fixes #49

aminya avatar Jan 06 '21 02:01 aminya

@juliangruber Could you register your fork on npm so we can use it?

You can also publish it :) Or use the npm github syntax

juliangruber avatar Jan 06 '21 13:01 juliangruber