Skip to content

Commit 7de4730

Browse files
committed
fix: update copy-static script in new handbook sites to use correct path
1 parent 4afdfff commit 7de4730

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/src/create-handbook.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ try {
3737
// 1. Copy template to new site
3838
fs.copySync(TEMPLATE_DIR, targetDir);
3939

40-
// 2. Update package.json with the new site name
40+
// 2. Update package.json with the new site name and correct copy-static script
4141
const packageJsonPath = path.join(targetDir, "package.json");
4242
const packageJson = fs.readJsonSync(packageJsonPath);
4343
packageJson.name = `${siteName}`;
44+
packageJson.scripts["copy-static"] = `pnpm --filter scripts copy-static sites/${siteName}/static/common`;
4445
fs.writeJsonSync(packageJsonPath, packageJson, { spaces: 2 });
4546

4647
console.log(`✅ Created new handbook site: ${siteName}`);

0 commit comments

Comments
 (0)