Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Slootweg b659a3f261 0.0.3 8 years ago
Sven Slootweg b7de442f25 Remove unnecessary `path.sep` usage 8 years ago

@ -1,6 +1,6 @@
{
"name": "get-project-root",
"version": "0.0.2",
"version": "0.0.3",
"description": "Locates the 'root directory' of the current project",
"main": "index.js",
"scripts": {

@ -6,7 +6,7 @@ const defaultValue = require("default-value");
let defaultCheckers = {
"package.json": function(directory) {
let parentPackageFile = path.join(directory, `..${path.sep}..${path.sep}package.json`);
let parentPackageFile = path.join(directory, "..", "..", "package.json");
try {
fs.accessSync(parentPackageFile);
@ -74,7 +74,7 @@ module.exports = function(options) {
}
if (rootFound === false) {
currentPath = path.join(currentPath, `..${path.sep}..`);
currentPath = path.join(currentPath, "..", "..");
}
}

Loading…
Cancel
Save