swico 1.3.0-beta.4 → 1.3.0-beta.6
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/package.json +1 -1
- package/src/utils/config.js +9 -6
package/package.json
CHANGED
package/src/utils/config.js
CHANGED
|
@@ -185,6 +185,7 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
|
|
|
185
185
|
entryPath = path_1.default.resolve(projectPath, "./src/.swico/".concat(envPath, "index.js"));
|
|
186
186
|
templatePath = path_1.default.join(projectPath, '/src/index.ejs');
|
|
187
187
|
return [2, {
|
|
188
|
+
env: env,
|
|
188
189
|
projectPath: projectPath,
|
|
189
190
|
entryPath: entryPath,
|
|
190
191
|
templatePath: templatePath,
|
|
@@ -374,15 +375,17 @@ var initTemplateConfig = function (routerConfig, templateType, env) {
|
|
|
374
375
|
return [4, (0, exports.updateIndexFileText)(envPath, replaceIndexText)];
|
|
375
376
|
case 7:
|
|
376
377
|
_a.sent();
|
|
377
|
-
return [3,
|
|
378
|
+
return [3, 11];
|
|
378
379
|
case 8:
|
|
379
|
-
if (!(templateType === 'react')) return [3,
|
|
380
|
-
|
|
381
|
-
return [4, (0, exports.updateIndexFileText)(envPath, newReplaceIndexText)];
|
|
380
|
+
if (!(templateType === 'react')) return [3, 11];
|
|
381
|
+
return [4, (0, exports.handleLoadingFile)(replaceIndexText, envPath)];
|
|
382
382
|
case 9:
|
|
383
|
-
_a.sent();
|
|
384
|
-
|
|
383
|
+
newReplaceIndexText = _a.sent();
|
|
384
|
+
return [4, (0, exports.updateIndexFileText)(envPath, newReplaceIndexText)];
|
|
385
385
|
case 10:
|
|
386
|
+
_a.sent();
|
|
387
|
+
_a.label = 11;
|
|
388
|
+
case 11:
|
|
386
389
|
resolve(null);
|
|
387
390
|
return [2];
|
|
388
391
|
}
|