Lines 465-505javascript
465 if (options.addReviewer) {
466 const addReviewerYml = readTemplate("workflows/add-reviewer.yml");
467 writeFileSync(path.join(workflowDir, "add-reviewer.yml"), addReviewerYml, "utf8");
469 s.stop("ワークフローファイルをコピーしました");
470 s.start("package.json を生成しています...");
471 const variantPkgText = readTemplate(`nodejs/${options.variant}/package.json`);
472 const patchedPkgJson = patchPackageJson(JSON.parse(variantPkgText), options, nodeMajor);
473 const depcheckIgnore = templateConfig.depcheckIgnore ?? [];
474 if (depcheckIgnore.length > 0 || options.test) {
475 const depcheckPath = path.join(outDir, ".depcheckrc.json");
476 const updatedDepcheck = updateDepcheck(JSON.parse(readFileSync(depcheckPath, "utf8")), depcheckIgnore, options.test);
477 writeFileSync(depcheckPath, JSON.stringify(updatedDepcheck, null, 2) + "\n", "utf8");
479 if (templateConfig.configSchema) mkdirSync(path.join(outDir, "schema"), { recursive: true });
480 writeFileSync(path.join(outDir, "package.json"), JSON.stringify(patchedPkgJson, null, 2) + "\n", "utf8");
481 s.stop("package.json を生成しました");
482 s.start("pnpm-lock.yaml をコピーしています...");
483 const pnpmLock = readTemplate(`nodejs/${options.variant}/pnpm-lock.yaml`);
484 writeFileSync(path.join(outDir, "pnpm-lock.yaml"), pnpmLock, "utf8");
485 s.stop("pnpm-lock.yaml をコピーしました");
486 s.start("pnpm install を実行しています...");
487 await execa("pnpm", ["install", "--frozen-lockfile"], {
488 cwd: outDir,
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
dist/index.mjsView on unpkg · L485 491 s.stop("依存パッケージをインストールしました");
493 s.start("Jest 関連パッケージを削除しています...");
494 await execa("pnpm", [
500 s.stop("Jest 関連パッケージを削除しました");
502 s.start("fixpack を実行しています...");
504 await execa("npx", ["--yes", "fixpack"], { cwd: outDir });
505 s.stop("fixpack を実行しました");