-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce `include_dir` for use with gyp in a scalar context Deprecate use of `include` in an gyp array context, which happens to work when paths are absolute, but can fail on Windows when paths are relative and a gyp file contains multiple entries in its `include_dirs` directive. This change corrects documentation and tooling, adds support for relative paths (e.g. those containing whitespace) in a backwards compatible manner and makes the approach holistically consistent with that used by nan. PR-URL: #766 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
- Loading branch information
Showing
4 changed files
with
10 additions
and
9 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
const path = require('path'); | ||
|
||
const include = path.relative('.', __dirname); | ||
const include_dir = path.relative('.', __dirname); | ||
|
||
module.exports = { | ||
include: include, | ||
gyp: path.join(include, 'node_api.gyp:nothing'), | ||
include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0 | ||
include_dir, | ||
gyp: path.join(include_dir, 'node_api.gyp:nothing'), | ||
isNodeApiBuiltin: true, | ||
needsFlag: false | ||
}; |
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