Skip to content

Repository files navigation

melonJS Plugin Template

melonJS Logo

License: MIT

A starter template for creating melonJS plugins, built with esbuild and TypeScript.

Getting Started

  1. Clone or fork this repository

  2. Install dependencies:

    npm install
    
  3. Update package.json with your plugin name and description

  4. Implement your plugin in src/index.js

Build

npm run build

The generated files will be in the dist/ directory:

  • index.js — ES module bundle
  • index.d.ts — TypeScript declarations

Publishing

Update the name, description, and version fields in package.json, then:

npm publish

Plugin Structure

src/
└── index.js # your plugin entry point
scripts/
└── build.ts # esbuild configuration
dist/ # generated output (gitignored)

The template extends plugin.BasePlugin from melonJS. See the plugin API docs for available hooks and methods.

Need Help?

About

a project template to create your own plugin

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages