Files
KaTeX/.yarn/sdks/flow-bin/cli.js
ylemkimon ca00e01434 build: make vscode work with PnP (#2444)
* Make vscode work with PnP

* Add vscode extension recommendations

* Add newlines to the end of generated manifests
2020-08-31 17:38:48 +09:00

21 lines
617 B
JavaScript
Executable File

#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);
const relPnpApiPath = "../../../.pnp.js";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require flow-bin/cli.js
require(absPnpApiPath).setup();
}
}
// Defer to the real flow-bin/cli.js your application uses
module.exports = absRequire(`flow-bin/cli.js`);