wildpig 1.3.15 → 1.3.17

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.
Files changed (2) hide show
  1. package/bin/cli.ts +5 -1
  2. package/package.json +2 -2
package/bin/cli.ts CHANGED
@@ -6,12 +6,16 @@ import fs from "node:fs";
6
6
  const command = process.argv[2];
7
7
 
8
8
  if(command === "start"){
9
+ // 判断系统平台
10
+ const platform = process.platform;
11
+ let serverBin = "./server"; // linux
12
+ if(platform === "win32")serverBin = "server";
9
13
  // 设置一些环境变量
10
14
  process.env.NODE_ENV = "production";
11
15
  console.log(chalk.green("✨ [Wildpig] Start production server..."));
12
16
  const st = performance.now();
13
17
  // 启动二进制文件
14
- spawn(["server"], {
18
+ spawn([serverBin], {
15
19
  cwd: "./dist",
16
20
  stdout: "inherit",
17
21
  env: {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "wildpig",
3
- "version": "1.3.15",
3
+ "version": "1.3.17",
4
4
  "author": "eriktse",
5
5
  "main": "index.ts",
6
6
  "bin":{
7
7
  "wildpig": "./bin/cli.ts"
8
8
  },
9
- "dependencies": {
9
+ "peerDependencies": {
10
10
  "@nanostores/react": "^1.0.0",
11
11
  "@types/bun": "^1.3.4",
12
12
  "@types/react": "^19.2.7",