nuxt-gin-tools 0.0.12 → 0.1.1

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # nuxt-gin-tools
2
2
 
3
- This project is used as a dependency for [nuxt-gin-starter](https://github.com/RapboyGao/nuxt3-gin-starter.git)
3
+ This project is used as a dependency for [nuxt-gin-starter](https://github.com/RapboyGao/nuxt-gin-starter.git)
4
4
 
5
5
  ## Command: nuxt-gin dev
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-gin-tools",
3
- "version": "0.0.12",
3
+ "version": "0.1.1",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nuxt-gin": "index.js"
package/src/builder.js CHANGED
@@ -10,10 +10,10 @@ const path_1 = require("path");
10
10
  const cwd = process.cwd();
11
11
  function build() {
12
12
  (0, fs_extra_1.ensureDirSync)((0, path_1.join)(cwd, "vue/.output"));
13
- (0, fs_extra_1.ensureFileSync)((0, path_1.join)(cwd, "tmp/production.exe"));
13
+ (0, fs_extra_1.ensureFileSync)((0, path_1.join)(cwd, ".server/production.exe"));
14
14
  return (0, concurrently_1.default)([
15
15
  {
16
- command: "go build -o ./tmp/production.exe .",
16
+ command: "go build -o ./.server/production.exe .",
17
17
  name: "go",
18
18
  prefixColor: "green",
19
19
  },
package/src/cleanup.js CHANGED
@@ -73,7 +73,7 @@ function cleanUpBuild() {
73
73
  // 清理原始 dist 目录
74
74
  ifExistsRemove("dist");
75
75
  // 清理临时文件
76
- ifExistsRemove("tmp");
76
+ ifExistsRemove(".server");
77
77
  // 清理 Vue 应用构建输出目录
78
78
  ifExistsRemove("vue/.output");
79
79
  // 清理 OpenAPI 生成的文件
@@ -1,6 +1,7 @@
1
1
  export declare const config: {
2
2
  ssr: boolean;
3
3
  buildDir: string;
4
+ srcDir: string;
4
5
  /**
5
6
  * 配置实验性功能
6
7
  * 禁用 payloadExtraction 功能,该功能可能用于提取页面的有效负载数据
@@ -9,4 +10,10 @@ export declare const config: {
9
10
  experimental: {
10
11
  payloadExtraction: boolean;
11
12
  };
13
+ devtools: {
14
+ timeline: {
15
+ enabled: boolean;
16
+ };
17
+ };
12
18
  };
19
+ export default config;
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.config = void 0;
4
4
  exports.config = {
5
5
  ssr: false,
6
- buildDir: "vue/.nuxt",
6
+ buildDir: "vue/.nuxt", // 设置构建目录为 "vue/.nuxt",表示 Nuxt 项目的构建输出将存放在该目录下
7
+ srcDir: "vue", // 设置源代码目录为 "vue",表示 Nuxt 项目的源代码将存放在该目录下
7
8
  /**
8
9
  * 配置实验性功能
9
10
  * 禁用 payloadExtraction 功能,该功能可能用于提取页面的有效负载数据
@@ -12,4 +13,12 @@ exports.config = {
12
13
  experimental: {
13
14
  payloadExtraction: false,
14
15
  },
16
+ // 配置 Nuxt DevTools
17
+ // 启用时间线功能,可能用于调试和性能分析
18
+ devtools: {
19
+ timeline: {
20
+ enabled: true,
21
+ },
22
+ },
15
23
  };
24
+ exports.default = exports.config;
package/src/pack.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare const PACKAGE_JSON_CONTENT: {
15
15
  };
16
16
  export declare const FILES_TO_COPY: {
17
17
  "vue/.output": string;
18
- "tmp/production.exe": string;
18
+ ".server/production.exe": string;
19
19
  "server.config.json": string;
20
20
  };
21
21
  /**
package/src/pack.js CHANGED
@@ -74,13 +74,13 @@ exports.ORIGINAL_DIST_PATH = Path.resolve(process.cwd(), "dist");
74
74
  exports.PACKAGE_JSON_CONTENT = {
75
75
  private: true,
76
76
  scripts: {
77
- start: "./tmp/production.exe", // 定义启动命令
77
+ start: "./.server/production.exe", // 定义启动命令
78
78
  },
79
79
  };
80
80
  // 定义需要复制到构建目录的文件映射关系
81
81
  exports.FILES_TO_COPY = {
82
82
  "vue/.output": builtPath("vue/.output"), // Vue 应用构建输出
83
- "tmp/production.exe": builtPath("tmp/production.exe"), // 生产环境可执行文件
83
+ ".server/production.exe": builtPath(".server/production.exe"), // 生产环境可执行文件
84
84
  "server.config.json": builtPath("server.config.json"), // 服务器配置文件
85
85
  };
86
86
  /**
@@ -90,9 +90,9 @@ function writeScriptFiles() {
90
90
  // 写入 Windows 批处理启动脚本
91
91
  FS.outputFileSync(builtPath("start.bat"), `powershell -ExecutionPolicy ByPass -File ./start.ps1`);
92
92
  // 写入 PowerShell 启动脚本
93
- FS.outputFileSync(builtPath("start.ps1"), `./tmp/production.exe`);
93
+ FS.outputFileSync(builtPath("start.ps1"), `./.server/production.exe`);
94
94
  // 写入 Linux/macOS 启动脚本
95
- FS.outputFileSync(builtPath("start.sh"), `./tmp/production.exe`);
95
+ FS.outputFileSync(builtPath("start.sh"), `./.server/production.exe`);
96
96
  // 写入 package.json 文件,使用 2 个空格缩进
97
97
  FS.outputJSONSync(builtPath("package.json"), exports.PACKAGE_JSON_CONTENT, { spaces: 2 });
98
98
  }