swico 1.6.0-beta.2 → 1.6.0-beta.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "1.6.0-beta.2",
3
+ "version": "1.6.0-beta.3",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -297,11 +297,11 @@ var handleLoadingFile = function (replaceIndexText, envPath) { return __awaiter(
297
297
  return [4, fs_extra_1.default.access(path_1.default.resolve(projectPath, './src/loading/index.tsx'), fs_extra_1.default.constants.F_OK)];
298
298
  case 2:
299
299
  _a.sent();
300
- newReplaceIndexText = newReplaceIndexText.replace('"../loading"', '"../../../src/loading"');
300
+ newReplaceIndexText = newReplaceIndexText.replace('"../loading"', '"../../src/loading"');
301
301
  return [3, 4];
302
302
  case 3:
303
303
  e_1 = _a.sent();
304
- newReplaceIndexText = newReplaceIndexText.replace('"../../../src/loading"', '"../loading"');
304
+ newReplaceIndexText = newReplaceIndexText.replace('"../../src/loading"', '"../loading"');
305
305
  return [3, 4];
306
306
  case 4: return [2, newReplaceIndexText];
307
307
  }
@@ -313,7 +313,7 @@ var handleGlobalStyleFile = function (replaceIndexText) {
313
313
  var newReplaceIndexText = replaceIndexText;
314
314
  if (styleFilePath) {
315
315
  newReplaceIndexText = newReplaceIndexText.replaceAll("require(\"../../global.".concat(styleFileType, "\");"), '');
316
- newReplaceIndexText = "require(\"../../../src/global.".concat(styleFileType, "\");\n").concat(replaceIndexText);
316
+ newReplaceIndexText = "require(\"../../src/global.".concat(styleFileType, "\");\n").concat(replaceIndexText);
317
317
  }
318
318
  else {
319
319
  newReplaceIndexText = newReplaceIndexText.replaceAll(/require\("\.\.\/\.\.\/global.(less|scss|css)"\);/g, '');
@@ -371,12 +371,12 @@ var initTemplateConfig = function (routerConfig, templateType, env) {
371
371
  return [4, fs_extra_1.default.writeFile(hooksFilePath, replaceHooksText)];
372
372
  case 6:
373
373
  _a.sent();
374
- replaceIndexText = replaceIndexText.replace('require("../../global");', 'require("../../../src/global");');
374
+ replaceIndexText = replaceIndexText.replace('require("../../global");', 'require("../../src/global");');
375
375
  if (templateType === 'vue') {
376
- replaceIndexText = replaceIndexText.replace('require("../../layout/Layout")', 'require("../../../src/layout/Layout")');
376
+ replaceIndexText = replaceIndexText.replace('require("../../layout/Layout")', 'require("../../src/layout/Layout")');
377
377
  }
378
378
  else if (templateType === 'react') {
379
- replaceIndexText = replaceIndexText.replace('require("../../layout")', 'require("../../../src/layout")');
379
+ replaceIndexText = replaceIndexText.replace('require("../../layout")', 'require("../../src/layout")');
380
380
  }
381
381
  replaceIndexText = (0, exports.handleGlobalStyleFile)(replaceIndexText);
382
382
  if (!(templateType === 'vue')) return [3, 8];