howsmydriving-dummy
Version:
Dummy region plug-in for @HowsMyDrivingWA.
16 lines (15 loc) • 595 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var path = require("path");
var fs = require("fs");
function getAppRootPath() {
var root_path = path.resolve(__dirname + '/../../');
if (!fs.existsSync(path.resolve(root_path, 'package.json'))) {
root_path = path.resolve(__dirname + '/../../../');
if (!fs.existsSync(path.resolve(root_path, 'package.json'))) {
throw new Error("Cannot find app root path containing package.json: " + __dirname + ".");
}
}
return root_path;
}
exports.getAppRootPath = getAppRootPath;