gant-core 0.1.32 → 0.1.34

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/lib/cli/index.js CHANGED
@@ -5980,6 +5980,7 @@ const defaultConfig = {
5980
5980
  agentSuggest: true,
5981
5981
  //用户代理
5982
5982
  delegate: true,
5983
+ tools: true,
5983
5984
  userCardTypes: {},
5984
5985
  },
5985
5986
  fileConfig: {
@@ -6284,14 +6285,17 @@ const generateGant = (userConfig, cwd, vue) => {
6284
6285
  //app复制到前置执行
6285
6286
  let indexString = fs$6.readFileSync(path$5.resolve(__dirname, "./template/core.txt"), "utf-8");
6286
6287
  const packagesPaths = [...values(userConfig.packages), cwd];
6288
+ const appPackages = [...keys$6(userConfig.packages), userConfig.name];
6287
6289
  //复制public 并前置项目模块中的app文件
6288
6290
  const APP_CONFIG_FILES = ["app.ts", "app.tsx", "app.js"];
6289
- packagesPaths.map((packagePath) => {
6291
+ packagesPaths.map((packagePath, index) => {
6290
6292
  copyFolder(path$5.resolve(packagePath, "public"), path$5.resolve(tempPath, "public"));
6291
6293
  for (const fileName of APP_CONFIG_FILES) {
6292
6294
  const appPath = path$5.resolve(packagePath, fileName);
6293
- if (fs$6.existsSync(appPath))
6294
- return (AppContent += `import '${appPath}';\n`);
6295
+ if (fs$6.existsSync(appPath)) {
6296
+ const appName = appPackages[index];
6297
+ return (AppContent += `import '${appName}/${fileName}';\n`);
6298
+ }
6295
6299
  }
6296
6300
  return packagePath;
6297
6301
  });
@@ -48733,7 +48737,7 @@ const createCwdConfig = (cwd, name, vue) => {
48733
48737
  };
48734
48738
 
48735
48739
  var name = "gant-core";
48736
- var version = "0.1.31";
48740
+ var version = "0.1.34";
48737
48741
  var description = "";
48738
48742
  var main = "lib/index.js";
48739
48743
  var bin = {