UNPKG

1.87 kBJavaScriptView Raw
1"use strict";
2var __importStar = (this && this.__importStar) || function (mod) {
3 if (mod && mod.__esModule) return mod;
4 var result = {};
5 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6 result["default"] = mod;
7 return result;
8};
9Object.defineProperty(exports, "__esModule", { value: true });
10const fs = __importStar(require("fs"));
11const path = __importStar(require("path"));
12const appDirectory = fs.realpathSync(process.cwd());
13const useTemplate = appDirectory === fs.realpathSync(path.join(__dirname, '../..'));
14function resolveApp(relativePath) {
15 return path.resolve(appDirectory, relativePath);
16}
17function resolveOwn(relativePath) {
18 return path.resolve(__dirname, '../..', relativePath);
19}
20exports.paths = useTemplate
21 ? {
22 appPackageJson: resolveOwn('package.json'),
23 appIndexJs: resolveOwn('template/src/index.ts'),
24 appTsConfig: resolveOwn('template/tsconfig.json'),
25 appTsLint: resolveOwn('template/tslint.json'),
26 appDevBundlePath: resolveOwn('template/build'),
27 appSrc: resolveOwn('template/src'),
28 appBuild: resolveOwn('template/dist'),
29 testsSetup: resolveOwn('template/setupTests.ts'),
30 webpackOverride: resolveOwn('template/webpack.config.override.js'),
31 prodBundle: 'bundle.prod.js',
32 }
33 : {
34 appPackageJson: resolveApp('package.json'),
35 appIndexJs: resolveApp('src/index.ts'),
36 appTsConfig: resolveApp('tsconfig.json'),
37 appTsLint: resolveApp('tslint.json'),
38 appDevBundlePath: resolveApp('build'),
39 appSrc: resolveApp('src'),
40 appBuild: resolveApp('dist'),
41 testsSetup: resolveApp('setupTests.ts'),
42 webpackOverride: resolveApp('webpack.config.override.js'),
43 prodBundle: 'bundle.prod.js',
44 };
45//# sourceMappingURL=paths.js.map
\No newline at end of file