Sync to another project (sync-to-project.ps1)

Sync to another project (sync-to-project.ps1)

sync-to-project.ps1 overwrites the RPGReact plugin and the React menus source tree into another RPG Maker MZ project so you can customize UI there.

What it copies

  • Plugin: js/plugins/RPGReact.js and js/plugins/rpgreact/ (folder if present)

  • Menus (source): menus/src/, optional menus/public/, and top-level files like package.json, vite.config.mts, tsconfig.json, LICENSE.txt, plus any other files at the root of menus/ (not folders)

  • Deployment tooling into destination root: build-package.ps1, deploy.config.json

What it does NOT copy

  • menus/build/, menus/node_modules/, menus/.vite/, menus/shared/types.js

Usage

# Full sync (plugin + menus + deployment scripts) with confirmation
./sync-to-project.ps1 -Dest "C:\Projects\OtherMZGame"

# Force (no prompt)
./sync-to-project.ps1 -Dest "C:\Projects\OtherMZGame" -Force

# Preview only (no changes)
./sync-to-project.ps1 -Dest "C:\Projects\OtherMZGame" -DryRun

# Only plugin
./sync-to-project.ps1 -Dest "C:\Projects\OtherMZGame" -OnlyPlugin -Force

# Only menus (still copies deployment scripts)
./sync-to-project.ps1 -Dest "C:\Projects\OtherMZGame" -OnlyMenus -Force

After syncing (destination project)

This generates menus/build/ and menus/shared/types.js in the destination.

Safety

  • The script deletes destination targets before copying (to avoid stale files).

  • It validates the destination exists and warns if it doesn’t look like an MZ project (index.html/js/data).

  • Use -DryRun to see the plan; use -Force to skip the confirmation prompt.

Last updated