create-watchpot 1.0.0-rc.1 → 1.0.0-rc.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1372,7 +1372,7 @@ ${i}
1372
1372
 
1373
1373
  // ../../templates/game/.scaffold/generate.ts
1374
1374
  import { spawnSync } from "node:child_process";
1375
- import { cp, mkdir as mkdir2, readdir, readFile as readFile2, rm, writeFile as writeFile2 } from "node:fs/promises";
1375
+ import { cp, mkdir as mkdir2, readdir, readFile as readFile2, rename, rm, writeFile as writeFile2 } from "node:fs/promises";
1376
1376
  import { createRequire } from "node:module";
1377
1377
  import { dirname as dirname2, join, resolve } from "node:path";
1378
1378
  import { fileURLToPath } from "node:url";
@@ -2494,6 +2494,7 @@ async function copyTemplate(out, template) {
2494
2494
  recursive: true,
2495
2495
  filter: (src) => !/[\\/](node_modules|\.git|\.scaffold)([\\/]|$)/.test(src.slice(template.length))
2496
2496
  });
2497
+ await rename(join(out, "gitignore"), join(out, ".gitignore"));
2497
2498
  }
2498
2499
  async function writeTokens(out) {
2499
2500
  await buildTokens({ tokens: join(out, "design", "tokens.json"), out: join(out, "src", "tokens.css") });
@@ -3002,6 +3003,13 @@ function install(dir, vite) {
3002
3003
  });
3003
3004
  if (r.error || r.status !== 0)
3004
3005
  throw new Error(`${bun ? "bun" : "npm"} install failed in ${dir}`);
3006
+ const fmt = spawnSync3(cmd, ["run", "lint:fix"], {
3007
+ cwd: dir,
3008
+ stdio: "ignore",
3009
+ shell: !bun && process.platform === "win32"
3010
+ });
3011
+ if (fmt.error || fmt.status !== 0)
3012
+ console.warn("create-watchpot: run `lint:fix` in the game to format it");
3005
3013
  }
3006
3014
  async function main() {
3007
3015
  const flags = parseFlags(process.argv.slice(2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-watchpot",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Make a new idle game on the watchpot engine: bun create watchpot, or npm create watchpot.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@clack/prompts": "^1.9.0",
18
- "watchpot": "workspace:^1.0.0-rc.1"
18
+ "watchpot": "^1.0.0-rc.3"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@tailwindcss/vite": "^4.3.5",