Skip to content

📦 A minimal template for creating and publishing KAPLAY plugins

Notifications You must be signed in to change notification settings

kaplayjs/kaplay-plugin-template-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KAPLAY Plugin Template

A minimal and clean KAPLAY.js plugin template for creating and publishing plugins.

If you're reading the kaplay-hi-plugin-ts on NPM, this is a demo plugin that adds a hi() function to log "hi". If you want to create your plugin, check the template.

Download template

You can download the template using "Download ZIP" option in GitHub or by using git clone:

git clone https://github.com/kaplayjs/kaplay-plugin-template-ts

Then navigate to the template folder and install dependencies:

cd kaplay-plugin-template-ts
npm install

Creating your plugin

Your plugin code is in src/plugin.ts. To understand more about KAPLAY plugins, read this guide.

Testing and building

test/game.ts file imports your plugin that you can test with a KAPLAY game. You can then build your masterpiece with:

npm run build

After selecting a name, you can publish it using:

npm publish

We recommend adding kaplay- before plugin names. For example:

  • kaplay-matter
  • kaplay-box2d
  • kaplay-poki

etc.

About

📦 A minimal template for creating and publishing KAPLAY plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published