fix: move dev script and check for pid

This commit is contained in:
lucas-neynar 2025-03-17 13:09:43 -07:00
parent d483780019
commit be7f23a88b
No known key found for this signature in database
3 changed files with 1788 additions and 6 deletions

1781
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "create-neynar-farcaster-frame", "name": "create-neynar-farcaster-frame",
"version": "1.0.6", "version": "1.0.7",
"type": "module", "type": "module",
"files": [ "files": [
"bin/index.js" "bin/index.js"
@ -14,8 +14,7 @@
"web3" "web3"
], ],
"scripts": { "scripts": {
"localtunnel": "node localtunnel.js", "dev": "node scripts/dev.js",
"dev": "node dev.js",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint"
@ -27,5 +26,9 @@
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"inquirer": "^12.4.3", "inquirer": "^12.4.3",
"viem": "^2.23.6" "viem": "^2.23.6"
},
"devDependencies": {
"typescript": "^5.6.3",
"@neynar/nodejs-sdk": "^2.19.0"
} }
} }

2
dev.js → scripts/dev.js Normal file → Executable file
View File

@ -56,7 +56,9 @@ async function startDev() {
// Kill the main process first // Kill the main process first
nextDev.kill('SIGKILL'); nextDev.kill('SIGKILL');
// Then kill any remaining child processes in the group // Then kill any remaining child processes in the group
if (nextDev?.pid) {
process.kill(-nextDev.pid); process.kill(-nextDev.pid);
}
console.log('🛑 Next.js dev server stopped'); console.log('🛑 Next.js dev server stopped');
} }