scriptsの基本
{
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"lint": "eslint src/",
"deploy": "npm run build && wrangler deploy"
}
}
npm run dev
npm run build
特殊なスクリプト名
| スクリプト名 | 実行 |
|---|---|
start | npm start(runなし) |
test | npm test(runなし) |
prebuild | build の前に自動実行 |
ハマったポイント
&&はWindowsで動かない場合があるnpm startとnpm testはrunが不要