PKG_PATH, pkgPath
This commit is contained in:
parent
bcc7542f28
commit
fd856f8163
|
@ -20,6 +20,11 @@ if (!process.env.EMBARK_PATH) {
|
|||
process.env.EMBARK_PATH = utils.joinPath(__dirname, '..');
|
||||
}
|
||||
|
||||
// set the anchor for embark's fs.pkgPath()
|
||||
if (!process.env.PKG_PATH) {
|
||||
process.env.PKG_PATH = process.env.PWD;
|
||||
}
|
||||
|
||||
// NOTE: setting NODE_PATH at runtime won't effect lookup behavior in the
|
||||
// current process, but will take effect in child processes; this enables
|
||||
// lookup of *global* embark's own node_modules from within dapp scripts (such
|
||||
|
|
|
@ -106,6 +106,10 @@ function dappPath() {
|
|||
return anchoredPath('DAPP_PATH', ...arguments);
|
||||
}
|
||||
|
||||
function pkgPath() {
|
||||
return anchoredPath('PKG_PATH', ...arguments);
|
||||
}
|
||||
|
||||
function createWriteStream() {
|
||||
return fs.createWriteStream.apply(fs.createWriteStream, arguments);
|
||||
}
|
||||
|
@ -156,6 +160,7 @@ module.exports = {
|
|||
removeSync,
|
||||
embarkPath,
|
||||
dappPath,
|
||||
pkgPath,
|
||||
createWriteStream,
|
||||
tmpDir,
|
||||
copyPreserve
|
||||
|
|
Loading…
Reference in New Issue