34 lines
1.2 KiB
Bash
34 lines
1.2 KiB
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
SEED_DIR=/tmp/agweb-nuxt-seed
|
||
|
|
|
||
|
|
echo "Creating Nuxt seed in $SEED_DIR"
|
||
|
|
rm -rf "$SEED_DIR"
|
||
|
|
CI=1 npx create-nuxt@latest "$SEED_DIR" --template minimal --packageManager npm --no-install --force --gitInit false || true
|
||
|
|
|
||
|
|
echo "Creating nuxt-web target directories"
|
||
|
|
mkdir -p nuxt-web
|
||
|
|
mkdir -p nuxt-web/pages nuxt-web/layouts nuxt-web/components nuxt-web/composables nuxt-web/public nuxt-web/assets/styles nuxt-web/scripts
|
||
|
|
|
||
|
|
echo "Copying baseline files into nuxt-web/"
|
||
|
|
cp "$SEED_DIR/package.json" nuxt-web/
|
||
|
|
cp "$SEED_DIR/tsconfig.json" nuxt-web/
|
||
|
|
cp "$SEED_DIR/.gitignore" nuxt-web/
|
||
|
|
cp "$SEED_DIR/nuxt.config.ts" nuxt-web/
|
||
|
|
cp "$SEED_DIR/public/favicon.ico" nuxt-web/public/
|
||
|
|
cp "$SEED_DIR/public/robots.txt" nuxt-web/public/
|
||
|
|
|
||
|
|
cat <<'EOF'
|
||
|
|
Nuxt foundation seed copied into nuxt-web/.
|
||
|
|
|
||
|
|
Next manual steps:
|
||
|
|
1. Review and rewrite nuxt-web/package.json for AgWeb dependencies.
|
||
|
|
2. cd nuxt-web && npm install
|
||
|
|
3. cd nuxt-web && npm install @nuxt/content @nuxt/image @nuxtjs/sitemap @nuxtjs/robots @vueuse/nuxt swiper @fancyapps/ui three
|
||
|
|
4. Add AgWeb baseline files: app.vue, layouts/default.vue, pages/index.vue, content.config.ts, assets/styles/main.css
|
||
|
|
5. Verify with:
|
||
|
|
cd nuxt-web && npm run dev
|
||
|
|
cd nuxt-web && npm run generate
|
||
|
|
EOF
|