UNPKG

1.82 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const tslib_1 = require("tslib");
4const fs = tslib_1.__importStar(require("fs"));
5const path = tslib_1.__importStar(require("path"));
6const appDirectory = fs.realpathSync(process.cwd());
7const useTemplate = appDirectory === fs.realpathSync(path.join(__dirname, '../..'));
8function resolveApp(relativePath) {
9 return path.resolve(appDirectory, relativePath);
10}
11exports.resolveApp = resolveApp;
12function resolveOwn(relativePath) {
13 return path.resolve(__dirname, '../..', relativePath);
14}
15exports.resolveOwn = resolveOwn;
16exports.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//# sourceMappingURL=paths.js.map
\No newline at end of file