Compare commits

..

1 Commits

Author SHA1 Message Date
giles 15c64388df Update index.js 2023-10-23 19:27:51 +00:00
1 changed files with 312 additions and 307 deletions

View File

@ -261,7 +261,12 @@ const pkg = getPackageJson();
})(); })();
function getPackageJson() { function getPackageJson() {
const pathToPackage = path.join(workspace, 'package.json'); const pathToPackage = path.join(workspace, 'package.json');
console.log({
pathToPackage,
workspace,
})
if (!existsSync(pathToPackage)) throw new Error("package.json could not be found in your project's root."); if (!existsSync(pathToPackage)) throw new Error("package.json could not be found in your project's root.");
return require(pathToPackage); return require(pathToPackage);
} }