Compare commits
1 Commits
master
...
package-js
Author | SHA1 | Date |
---|---|---|
giles | 15c64388df |
5
index.js
5
index.js
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue