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