mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
playwright github ci action
This commit is contained in:
parent
db7cbd8982
commit
8f46b276c0
3 changed files with 57 additions and 21 deletions
37
server.js
37
server.js
|
@ -85,24 +85,25 @@ fastify.listen({
|
|||
host: "0.0.0.0",
|
||||
});
|
||||
console.log(`Listening on port ${PORT}`);
|
||||
if (!process.env.CI) {
|
||||
try {
|
||||
writeFileSync(
|
||||
".git/hooks/pre-commit",
|
||||
"pnpm prettier . -w\ngit update-index --again"
|
||||
);
|
||||
chmodSync(".git/hooks/pre-commit", 0o755);
|
||||
} catch {}
|
||||
|
||||
try {
|
||||
writeFileSync(
|
||||
".git/hooks/pre-commit",
|
||||
"pnpm prettier . -w\ngit update-index --again"
|
||||
);
|
||||
chmodSync(".git/hooks/pre-commit", 0o755);
|
||||
} catch {}
|
||||
const watch = spawn("pnpm", ["rspack", "-w"], {
|
||||
detached: true,
|
||||
cwd: process.cwd(),
|
||||
});
|
||||
|
||||
const watch = spawn("pnpm", ["rspack", "-w"], {
|
||||
detached: true,
|
||||
cwd: process.cwd(),
|
||||
});
|
||||
watch.stdout.on("data", (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
||||
|
||||
watch.stdout.on("data", (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
||||
|
||||
watch.stderr.on("data", (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
||||
watch.stderr.on("data", (data) => {
|
||||
console.log(`${data}`);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue