This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Enable install and build using node-chakracore #1777
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
eec8afa
Enable building for node-chakracore
kunalspathak 4819b82
Update getBinaryName() to support node-chakracore
kunalspathak 5d8ef9f
Add Node ChakraCore to AppVeyor config
xzyfer 7924ebc
Revert "Add Node ChakraCore to AppVeyor config"
kunalspathak 358b01b
Use NVS for appveyor
kunalspathak e1b536b
Use NVS for .travis
kunalspathak c7124bb
Replace = with : in travis
kunalspathak 6785d4d
travis: Added `dist=trusty` for node-chakracore to work
kunalspathak 8db7ad7
Fix travis validation problem
kunalspathak d39e552
Fixed delim for non-windows
kunalspathak d19aa55
Updated appveyor for non-release branches
kunalspathak 5021dff
Test fixes and node-gyp version bump
kunalspathak 4077615
Removing `global` from travis.yml
kunalspathak e334f71
fixed lint errors
kunalspathak a602a0b
Revert nvs port on .travis.yml
kunalspathak 15983e9
Use nvm to install node-chakracore
kunalspathak 8591db4
Upgraded nvs to 1.4 for appveyor.yml
kunalspathak e00e5bf
updated appveyor to chakracore/8
kunalspathak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,14 +56,20 @@ function afterBuild(options) { | |
*/ | ||
|
||
function build(options) { | ||
var args = [require.resolve(path.join('node-gyp', 'bin', 'node-gyp.js')), 'rebuild', '--verbose'].concat( | ||
['libsass_ext', 'libsass_cflags', 'libsass_ldflags', 'libsass_library'].map(function(subject) { | ||
return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join(''); | ||
})).concat(options.args); | ||
|
||
console.log('Building:', [process.execPath].concat(args).join(' ')); | ||
|
||
var proc = spawn(process.execPath, args, { | ||
var nodeGyp = resolveNodeGyp(); | ||
var nodeGypArgs = nodeGyp.args.concat([ | ||
'rebuild', | ||
'--verbose', | ||
'--libsass_ext=' + (process.env['LIBSASS_EXT'] || ''), | ||
'--libsass_cflags=' + (process.env['LIBSASS_CFLAGS'] || ''), | ||
'--libsass_ldflags=' + (process.env['LIBSASS_LDFLAGS'] || ''), | ||
'--libsass_library=' + (process.env['LIBSASS_LIBRARY'] || ''), | ||
]) | ||
.concat(options.args); | ||
|
||
console.log(['Building:', nodeGyp.exeName].concat(nodeGypArgs).join(' ')); | ||
|
||
var proc = spawn(nodeGyp.exeName, nodeGypArgs, { | ||
stdio: [0, 1, 2] | ||
}); | ||
|
||
|
@@ -83,6 +89,19 @@ function build(options) { | |
}); | ||
} | ||
|
||
/** | ||
* Resolve node-gyp command to invoke | ||
* | ||
* @api private | ||
*/ | ||
function resolveNodeGyp() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need this now that the version is bumped to 3.6? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No and that's why i removed my changes in 5021dff . I just kept the resolution of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 that makes sense |
||
var localNodeGypBin = require.resolve(path.join('node-gyp', 'bin', 'node-gyp.js')); | ||
|
||
return { | ||
exeName: process.execPath, | ||
args: [localNodeGypBin], | ||
}; | ||
} | ||
/** | ||
* Parse arguments | ||
* | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth looking at https://github.com/appveyor/ci/blob/master/scripts/nodejs-utils.psm1 to get "native" support for Chakra on Appveyor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is definitely an option (and likewise in
nvm
and hencenode-chakracore
), but at this time we just preferred usingnvs
since it added support for CI recently.