mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
* Make vscode work with PnP * Add vscode extension recommendations * Add newlines to the end of generated manifests
21 lines
617 B
JavaScript
Executable File
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`);
|