UNPKG

1.35 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const path_1 = require("path");
4function getRootPath() {
5 if (process.cwd() === __dirname) {
6 return path_1.resolve(process.cwd(), 'sample');
7 }
8 return process.cwd();
9}
10exports.getRootPath = getRootPath;
11function getApiPath() {
12 return path_1.resolve(getRootPath(), 'api');
13}
14exports.getApiPath = getApiPath;
15function getBuildPath() {
16 if (process.cwd() === __dirname) {
17 return path_1.resolve(process.cwd(), 'build');
18 }
19 return path_1.resolve(getRootPath(), 'build');
20}
21exports.getBuildPath = getBuildPath;
22function getBuildRootPath() {
23 if (process.cwd() === __dirname) {
24 return path_1.resolve(process.cwd(), 'build', 'sample');
25 }
26 return getBuildPath();
27}
28exports.getBuildRootPath = getBuildRootPath;
29function getApiBuildPath() {
30 return path_1.resolve(getBuildRootPath(), 'api');
31}
32exports.getApiBuildPath = getApiBuildPath;
33function getSchemaPath() {
34 if (process.cwd() === __dirname) {
35 return path_1.resolve(process.cwd(), 'schema');
36 }
37 return path_1.resolve(getRootPath(), 'schema');
38}
39exports.getSchemaPath = getSchemaPath;
40function getBuildSchemaPath() {
41 return path_1.resolve(getBuildPath(), 'schema');
42}
43exports.getBuildSchemaPath = getBuildSchemaPath;
44//# sourceMappingURL=paths.js.map
\No newline at end of file