kaplay-savesystem
v1.0.3
Published
My super KAPLAY plugin!
Readme
KAPLAY Plugin Template
A minimal and clean KAPLAY.js plugin template for creating and publishing plugins.
If you're reading the
kaplay-hi-pluginon NPM, this is a demo plugin that adds ahi()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-templateThen navigate to the template folder and install dependencies:
cd kaplay-plugin-template
npm installCreating your plugin
Your plugin code is in src/plugin.js. To understand more about KAPLAY plugins,
read this guide.
Testing and building
test/game.js file imports your plugin that you can test with a KAPLAY game.
You can then build your masterpiece with:
npm run buildPublicar tu plugin en npm
- Asegúrate de haber editado el campo
nameenpackage.jsonpara que sea único y comience conkaplay-(por ejemplo,kaplay-savesystem). - Ejecuta el comando de build para generar la carpeta
dist/:
npm run build- Inicia sesión en npm (solo la primera vez):
npm login- Publica tu plugin:
npm publish --access public¡Listo! Ahora cualquier persona podrá instalar tu plugin con:
npm install nombre-del-paqueteY usarlo en su proyecto KAPLAY:
import saveSystemPlugin from "nombre-del-paquete";Si tienes dudas, revisa la documentación oficial de npm o la guía de plugins de KAPLAY.
We recommend adding kaplay- before plugin names. For example:
kaplay-matterkaplay-box2dkaplay-poki
etc.
