You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/npm/ng-packs/scripts/.yarn.js

29 lines
646 B

"use strict"
const child_process = require("child_process")
const { env } = process
const { parent } = module
const REQUIRE_ESM = "--require esm"
const REQUIRE_DOT_YARN = "--require ./.yarn.js"
let { NODE_OPTIONS } = env
if (typeof NODE_OPTIONS === "string") {
NODE_OPTIONS += " "
} else {
NODE_OPTIONS = ""
}
if (parent != null &&
parent.id === "internal/preload") {
env.NODE_OPTIONS = NODE_OPTIONS.replace(REQUIRE_DOT_YARN, REQUIRE_ESM)
} else {
child_process.spawn("yarn", process.argv.slice(2), {
env: Object.assign({}, env, {
NODE_OPTIONS: REQUIRE_DOT_YARN + " " + NODE_OPTIONS
}),
stdio: "inherit"
})
}