Skip to content

revert(create-melonjs): drop --template flag#1441

Merged
obiot merged 1 commit intomasterfrom
chore/revert-create-melonjs-template
May 10, 2026
Merged

revert(create-melonjs): drop --template flag#1441
obiot merged 1 commit intomasterfrom
chore/revert-create-melonjs-template

Conversation

@obiot
Copy link
Copy Markdown
Member

@obiot obiot commented May 10, 2026

Summary

Walks back the --template <name> / -t flag added to create-melonjs in #1439. Aligns with how the other plugins (@melonjs/spine-plugin, @melonjs/tiled-inflate-plugin, @melonjs/debug-plugin) work today — users scaffold the default boilerplate and npm install the plugin themselves.

The Capacitor wiki page (draft at /tmp/Capacitor.md) documents the manual steps. No new boilerplate repo or subfolder needed.

Why revert

Two undesirable downstream costs of the flag:

  1. Maintaining a Capacitor-flavored boilerplate — either a separate typescript-boilerplate-capacitor repo (drift on every melonJS / @melonjs/* bump) or a capacitor/ subfolder of the existing repo (cleaner but still extra surface).
  2. Or patching the default scaffold mid-install — the alternative without a separate boilerplate, but couples create-melonjs to the boilerplate's source layout (regex/AST edits to src/main.ts, package.json merges, etc.).

Neither is worth it. The Capacitor plugin is just npm install + a single plugin.register(...) call, same as the existing plugins.

Files

  • packages/create-melonjs/bin/create-melonjs.js — back to 99 lines, no flag parsing.
  • packages/create-melonjs/package.json — version stays at 1.0.1 (the 1.1.0 bump was never published).
  • packages/create-melonjs/CHANGELOG.md — 1.1.0 entry removed.
  • packages/create-melonjs/README.md — templates table removed.

The @melonjs/capacitor-plugin package itself is unaffected; this is create-melonjs-only.

Test plan

  • pnpm lint — 0 errors.
  • node bin/create-melonjs.js — usage banner is back to the original (no --template mention).

🤖 Generated with Claude Code

Walked back the `--template <name>` / `-t` flag and the related
1.0.1 → 1.1.0 version bump. Aligns with how the other plugins
(`@melonjs/spine-plugin`, `@melonjs/tiled-inflate-plugin`,
`@melonjs/debug-plugin`) work today: users scaffold the default
boilerplate and `npm install` the plugin themselves. The Capacitor
wiki page documents the manual steps.

This avoids:
- Maintaining a separate `typescript-boilerplate-capacitor` repo (or a
  subfolder of the existing one).
- Coupling create-melonjs to the boilerplate's source layout via
  string/AST patches.

Net: `bin/create-melonjs.js` back to 99 lines (no flag parsing),
`package.json` version stays at 1.0.1, README templates table
removed, and the 1.1.0 CHANGELOG entry deleted (it was never
published).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 10, 2026 11:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts the recently added --template/-t support in create-melonjs, returning the scaffolder to always using the default melonjs/typescript-boilerplate flow (with optional plugins installed manually afterward). This aligns create-melonjs with the existing plugin ecosystem approach.

Changes:

  • Removed the templates section from create-melonjs README.
  • Removed the 1.1.0 changelog entry describing template support.
  • Simplified bin/create-melonjs.js to stop parsing --template/-t and always scaffold from the default boilerplate; package version set back to 1.0.1.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
packages/create-melonjs/README.md Removes documentation for the --template feature and template table.
packages/create-melonjs/package.json Reverts package version back to 1.0.1.
packages/create-melonjs/CHANGELOG.md Removes the 1.1.0 entry that documented template support.
packages/create-melonjs/bin/create-melonjs.js Drops template flag parsing and always uses the default boilerplate repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@obiot obiot merged commit 852fe67 into master May 10, 2026
10 checks passed
@obiot obiot deleted the chore/revert-create-melonjs-template branch May 10, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants