bot/.yarn/sdks/prettier/bin/prettier.cjs

21 lines
601 B
JavaScript
Raw Normal View History

2023-06-18 03:57:02 +00:00
#!/usr/bin/env node
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);
2023-11-23 11:30:10 +00:00
const relPnpApiPath = "../../../../.pnp.cjs";
2023-06-18 03:57:02 +00:00
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
2023-11-23 11:30:10 +00:00
// Setup the environment to be able to require prettier/bin/prettier.cjs
2023-06-18 03:57:02 +00:00
require(absPnpApiPath).setup();
}
}
2023-11-23 11:30:10 +00:00
// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);