@modern-js/repo-generator 0.0.0-next-20221110051833 → 0.0.0-next-20221110142927
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -19
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -173326,7 +173326,7 @@ var require_alias3 = __commonJSMin((exports) => {
|
|
|
173326
173326
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
173327
173327
|
};
|
|
173328
173328
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173329
|
-
exports.getUserAlias = exports.
|
|
173329
|
+
exports.getUserAlias = exports.getAliasConfig = exports.mergeAlias = exports.validAlias = void 0;
|
|
173330
173330
|
var fs_1 = __importDefault(__require("fs"));
|
|
173331
173331
|
var path_1 = __importDefault(__require("path"));
|
|
173332
173332
|
var compiled_1 = require_compiled3();
|
|
@@ -173348,33 +173348,33 @@ var require_alias3 = __commonJSMin((exports) => {
|
|
|
173348
173348
|
return null;
|
|
173349
173349
|
};
|
|
173350
173350
|
exports.validAlias = validAlias;
|
|
173351
|
-
var
|
|
173351
|
+
var mergeAlias = (alias) => (0, applyOptionsChain_1.applyOptionsChain)({}, alias);
|
|
173352
|
+
exports.mergeAlias = mergeAlias;
|
|
173353
|
+
var getAliasConfig = (aliasOption, option) => {
|
|
173352
173354
|
var _a2, _b;
|
|
173353
173355
|
const isTsProject = fs_1.default.existsSync(option.tsconfigPath);
|
|
173354
|
-
|
|
173356
|
+
const alias = (0, exports.mergeAlias)(aliasOption);
|
|
173355
173357
|
if (!isTsProject) {
|
|
173356
|
-
|
|
173358
|
+
return {
|
|
173357
173359
|
absoluteBaseUrl: option.appDirectory,
|
|
173358
|
-
paths:
|
|
173360
|
+
paths: alias,
|
|
173359
173361
|
isTsPath: false,
|
|
173360
173362
|
isTsProject
|
|
173361
173363
|
};
|
|
173362
|
-
} else {
|
|
173363
|
-
const tsconfig = (0, readTsConfig_1.readTsConfigByFile)(option.tsconfigPath);
|
|
173364
|
-
const baseUrl = (_a2 = tsconfig === null || tsconfig === void 0 ? void 0 : tsconfig.compilerOptions) === null || _a2 === void 0 ? void 0 : _a2.baseUrl;
|
|
173365
|
-
aliasConfig = {
|
|
173366
|
-
absoluteBaseUrl: baseUrl ? path_1.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
|
173367
|
-
paths: {
|
|
173368
|
-
...aliasOption || {},
|
|
173369
|
-
...(_b = tsconfig === null || tsconfig === void 0 ? void 0 : tsconfig.compilerOptions) === null || _b === void 0 ? void 0 : _b.paths
|
|
173370
|
-
},
|
|
173371
|
-
isTsPath: true,
|
|
173372
|
-
isTsProject
|
|
173373
|
-
};
|
|
173374
173364
|
}
|
|
173375
|
-
|
|
173365
|
+
const tsconfig = (0, readTsConfig_1.readTsConfigByFile)(option.tsconfigPath);
|
|
173366
|
+
const baseUrl = (_a2 = tsconfig === null || tsconfig === void 0 ? void 0 : tsconfig.compilerOptions) === null || _a2 === void 0 ? void 0 : _a2.baseUrl;
|
|
173367
|
+
return {
|
|
173368
|
+
absoluteBaseUrl: baseUrl ? path_1.default.join(option.appDirectory, baseUrl) : option.appDirectory,
|
|
173369
|
+
paths: {
|
|
173370
|
+
...alias,
|
|
173371
|
+
...(_b = tsconfig === null || tsconfig === void 0 ? void 0 : tsconfig.compilerOptions) === null || _b === void 0 ? void 0 : _b.paths
|
|
173372
|
+
},
|
|
173373
|
+
isTsPath: true,
|
|
173374
|
+
isTsProject
|
|
173375
|
+
};
|
|
173376
173376
|
};
|
|
173377
|
-
exports.
|
|
173377
|
+
exports.getAliasConfig = getAliasConfig;
|
|
173378
173378
|
var getUserAlias = (alias = {}) => Object.keys(alias).reduce((o, k) => {
|
|
173379
173379
|
if (Array.isArray(alias[k])) {
|
|
173380
173380
|
o[k] = alias[k];
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-20221110142927",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@babel/runtime": "^7.18.0",
|
|
26
|
-
"@modern-js/base-generator": "0.0.0-next-
|
|
26
|
+
"@modern-js/base-generator": "0.0.0-next-20221110142927",
|
|
27
27
|
"@modern-js/codesmith": "1.6.3",
|
|
28
28
|
"@modern-js/codesmith-api-app": "1.6.3",
|
|
29
|
-
"@modern-js/generator-common": "0.0.0-next-
|
|
30
|
-
"@modern-js/generator-plugin": "0.0.0-next-
|
|
31
|
-
"@modern-js/generator-utils": "0.0.0-next-
|
|
32
|
-
"@modern-js/module-generator": "0.0.0-next-
|
|
33
|
-
"@modern-js/monorepo-generator": "0.0.0-next-
|
|
34
|
-
"@modern-js/mwa-generator": "0.0.0-next-
|
|
35
|
-
"@modern-js/utils": "0.0.0-next-
|
|
36
|
-
"@scripts/build": "0.0.0-next-
|
|
37
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
29
|
+
"@modern-js/generator-common": "0.0.0-next-20221110142927",
|
|
30
|
+
"@modern-js/generator-plugin": "0.0.0-next-20221110142927",
|
|
31
|
+
"@modern-js/generator-utils": "0.0.0-next-20221110142927",
|
|
32
|
+
"@modern-js/module-generator": "0.0.0-next-20221110142927",
|
|
33
|
+
"@modern-js/monorepo-generator": "0.0.0-next-20221110142927",
|
|
34
|
+
"@modern-js/mwa-generator": "0.0.0-next-20221110142927",
|
|
35
|
+
"@modern-js/utils": "0.0.0-next-20221110142927",
|
|
36
|
+
"@scripts/build": "0.0.0-next-20221110142927",
|
|
37
|
+
"@scripts/jest-config": "0.0.0-next-20221110142927",
|
|
38
38
|
"@types/jest": "^27",
|
|
39
39
|
"@types/node": "^14",
|
|
40
40
|
"jest": "^27",
|