nuxt-gin-tools 0.0.7 → 0.0.8

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": "nuxt-gin-tools",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nuxt-gin": "index.js"
@@ -1,13 +1,12 @@
1
- import type { NuxtConfig } from "nuxt/config";
2
- /** API配置模式接口 */
3
- export interface ServerConfig {
4
- /** Gin框架端口 */
5
- ginPort: number;
6
- /** Nuxt框架devServer端口 */
7
- nuxtPort: number;
8
- /** Nuxt的BaseUrl,必须以/开头并包含至少一个单词字符 */
9
- baseUrl: string;
10
- }
11
- export declare const config: NuxtConfig;
12
- export declare function getServerConfig(nitro: NuxtConfig["nitro"]): NuxtConfig;
13
- export default getServerConfig;
1
+ export declare const config: {
2
+ ssr: boolean;
3
+ buildDir: string;
4
+ /**
5
+ * 配置实验性功能
6
+ * 禁用 payloadExtraction 功能,该功能可能用于提取页面的有效负载数据
7
+ * 这里禁用它可能是为了避免某些兼容性问题或特定的项目需求
8
+ */
9
+ experimental: {
10
+ payloadExtraction: boolean;
11
+ };
12
+ };
@@ -1,30 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.config = void 0;
4
- exports.getServerConfig = getServerConfig;
5
- const fs_extra_1 = require("fs-extra");
6
- const path_1 = require("path");
7
- const cwd = process.cwd();
8
- const serverConfig = (0, fs_extra_1.readJSONSync)((0, path_1.resolve)(cwd, `server.config.json`));
9
4
  exports.config = {
10
5
  ssr: false,
11
- app: { baseURL: serverConfig.baseUrl },
12
- devServer: { port: serverConfig.nuxtPort },
13
- experimental: { payloadExtraction: false },
14
- vite: {
15
- esbuild: { jsxFactory: "h", jsxFragment: "Fragment" },
16
- },
17
- rootDir: "vue",
18
- devtools: {
19
- timeline: {
20
- enabled: true,
21
- },
6
+ buildDir: "vue/.nuxt",
7
+ /**
8
+ * 配置实验性功能
9
+ * 禁用 payloadExtraction 功能,该功能可能用于提取页面的有效负载数据
10
+ * 这里禁用它可能是为了避免某些兼容性问题或特定的项目需求
11
+ */
12
+ experimental: {
13
+ payloadExtraction: false,
22
14
  },
23
15
  };
24
- function getServerConfig(nitro) {
25
- return {
26
- ...exports.config,
27
- nitro,
28
- };
29
- }
30
- exports.default = getServerConfig;
package/src/pack.js CHANGED
@@ -34,6 +34,8 @@ const FILE_LIST = ["vue/.output", "tmp/production.exe", "ecosystem.config.js", "
34
34
  const PACKAGE_JSON = BUILD_DEST + "/package.json";
35
35
  /** 打包package.7z位置 */
36
36
  const _7Z_PATH = BUILD_DEST + "/../package.7z";
37
+ /** 打包package.7z相对位置 */
38
+ const _7Z_PATH_RELATIVE = path_1.default.relative(cwd, _7Z_PATH);
37
39
  /** package.json 内容 */
38
40
  const PACKAGE_JSON_CONTENT = {
39
41
  private: true,
@@ -78,7 +80,7 @@ function buildAndPack() {
78
80
  return __awaiter(this, void 0, void 0, function* () {
79
81
  yield (0, builder_1.default)();
80
82
  yield pack();
81
- console.log(chalk_1.default.bgGreen("打包完成!", _7Z_PATH));
83
+ console.log(chalk_1.default.bgGreen("打包完成!", _7Z_PATH_RELATIVE));
82
84
  });
83
85
  }
84
86
  exports.default = buildAndPack;