1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const tslib_1 = require("tslib");
|
4 | const fs = tslib_1.__importStar(require("fs"));
|
5 | const path = tslib_1.__importStar(require("path"));
|
6 | const appDirectory = fs.realpathSync(process.cwd());
|
7 | const useTemplate = appDirectory === fs.realpathSync(path.join(__dirname, '../..'));
|
8 | function resolveApp(relativePath) {
|
9 | return path.resolve(appDirectory, relativePath);
|
10 | }
|
11 | exports.resolveApp = resolveApp;
|
12 | function resolveOwn(relativePath) {
|
13 | return path.resolve(__dirname, '../..', relativePath);
|
14 | }
|
15 | exports.resolveOwn = resolveOwn;
|
16 | exports.paths = useTemplate
|
17 | ? {
|
18 | appPackageJson: resolveOwn('package.json'),
|
19 | appIndexJs: resolveOwn('template/src/index.ts'),
|
20 | appTsConfig: resolveOwn('template/tsconfig.json'),
|
21 | appEslint: resolveOwn('template/.eslintrc.json'),
|
22 | appDevBundlePath: resolveOwn('template/build'),
|
23 | appSrc: resolveOwn('template/src'),
|
24 | appBuild: resolveOwn('template/dist'),
|
25 | testsSetup: resolveOwn('template/setupTests.ts'),
|
26 | webpackOverride: resolveOwn('template/webpack.config.override.js'),
|
27 | prodBundle: 'bundle.prod.js',
|
28 | legacyAppTslint: resolveOwn('template/tslint.json'),
|
29 | }
|
30 | : {
|
31 | appPackageJson: resolveApp('package.json'),
|
32 | appIndexJs: resolveApp('src/index.ts'),
|
33 | appTsConfig: resolveApp('tsconfig.json'),
|
34 | appEslint: resolveApp('.eslintrc.json'),
|
35 | appDevBundlePath: resolveApp('build'),
|
36 | appSrc: resolveApp('src'),
|
37 | appBuild: resolveApp('dist'),
|
38 | testsSetup: resolveApp('setupTests.ts'),
|
39 | webpackOverride: resolveApp('webpack.config.override.js'),
|
40 | prodBundle: 'bundle.prod.js',
|
41 | legacyAppTslint: resolveApp('tslint.json'),
|
42 | };
|
43 |
|
\ | No newline at end of file |