mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
21 lines
618 B
JavaScript
Executable File
21 lines
618 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const {existsSync} = require(`fs`);
|
|
const {createRequire, createRequireFromPath} = require(`module`);
|
|
const {resolve} = require(`path`);
|
|
|
|
const relPnpApiPath = "../../../.pnp.cjs";
|
|
|
|
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`);
|