Fix scripts for Next.js + Payload CMS workflow
- new-project.sh: Use nextjs-payload-starter template, Next.js AI rules - convert-astro.sh: Complete rewrite to migrate Astro MDX to Payload CMS Lexical JSON - deploy.sh: Check for next.config instead of astro.config.mjs, use MONGODB_URL - preview.sh: Check for Next.js, default port 3002 - audit-seo.sh: Check .tsx pages in src/app, Next.js config All scripts now properly support Next.js + Payload CMS workflow.
This commit is contained in:
@@ -19,7 +19,7 @@ NC='\033[0m'
|
||||
|
||||
# Default values
|
||||
PROJECT_PATH="${1:-.}"
|
||||
PORT="${2:-4321}"
|
||||
PORT="${2:-3002}"
|
||||
HOST="0.0.0.0"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -64,13 +64,13 @@ check_project() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for Astro or Emdash
|
||||
if ! grep -q "astro" "$PROJECT_PATH/package.json"; then
|
||||
log_error "ไม่ใช่ Astro project"
|
||||
# Check for Next.js
|
||||
if ! grep -q '"next"' "$PROJECT_PATH/package.json"; then
|
||||
log_error "ไม่ใช่ Next.js project"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log_success "พบ Astro project"
|
||||
|
||||
log_success "พบ Next.js project"
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@@ -159,7 +159,7 @@ check_port() {
|
||||
|
||||
main() {
|
||||
echo "=============================================="
|
||||
echo " Astro Preview Server"
|
||||
echo " Next.js Preview Server"
|
||||
echo "=============================================="
|
||||
echo ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user