@cortexql/core
Version:
A RESTful API framework for your apps based on GraphQL type system.
44 lines • 1.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
function getRootPath() {
if (process.cwd() === __dirname) {
return path_1.resolve(process.cwd(), 'sample');
}
return process.cwd();
}
exports.getRootPath = getRootPath;
function getApiPath() {
return path_1.resolve(getRootPath(), 'api');
}
exports.getApiPath = getApiPath;
function getBuildPath() {
if (process.cwd() === __dirname) {
return path_1.resolve(process.cwd(), 'build');
}
return path_1.resolve(getRootPath(), 'build');
}
exports.getBuildPath = getBuildPath;
function getBuildRootPath() {
if (process.cwd() === __dirname) {
return path_1.resolve(process.cwd(), 'build', 'sample');
}
return getBuildPath();
}
exports.getBuildRootPath = getBuildRootPath;
function getApiBuildPath() {
return path_1.resolve(getBuildRootPath(), 'api');
}
exports.getApiBuildPath = getApiBuildPath;
function getSchemaPath() {
if (process.cwd() === __dirname) {
return path_1.resolve(process.cwd(), 'schema');
}
return path_1.resolve(getRootPath(), 'schema');
}
exports.getSchemaPath = getSchemaPath;
function getBuildSchemaPath() {
return path_1.resolve(getBuildPath(), 'schema');
}
exports.getBuildSchemaPath = getBuildSchemaPath;
//# sourceMappingURL=paths.js.map