Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/comuns-rpgmaker/babel-plugin-archetype

Template for javascript plugins using Babel for RPG Maker MZ
https://github.com/comuns-rpgmaker/babel-plugin-archetype

archetype babel plugin rpgmaker rpgmakermz

Last synced: 2 months ago
JSON representation

Template for javascript plugins using Babel for RPG Maker MZ

Awesome Lists containing this project

README

        

# RPG Maker MZ - Babel Plugin Archetype

This is a template repository for writing plugins for RPG Maker MZ using Babel.
The main purpose here is to set a basis from which other repositories can
derive from and more easily be ready to start actual development.

## Getting Started

First of all, make sure you run `npm install` to install all the dependencies
for the project, such as [rollup.js](https://rollupjs.org/) and Babel itself.

Make sure to set `package.json` up correctly, changing the package name to that
of your plugin (this will be used to generate the output file) and adjust the
values of the `version` and `description` fields (and, optionally, `keywords`).
Also make sure to add a property `testProjectDir` if you want to test your
plugin (can be relative).

To configure plugin parameters and the likes, change `plugin-metadata.yaml`.
Read more about it on [comuns-rpgmaker/plugin-metadata][plugin-metadata].

[plugin-metadata]: https://github.com/comuns-rpgmaker/plugin-metadata

Once you are done, `npm run build` will create a JS file for your plugin as
`dist/js/plugins/{pkg.name}.js`.

By default, the plugin is wrapped into an IIFE and everything you export from
`./src/main.js` is saved under a namespace to be configured in `package.json`.

**TL;DR**:

First:
- `npm install`
- Modify `package.json`

Then:
- Modify `header.js` and write modern JS code on `src`
- `npm run build`
- Your plugin shows up compiled in `dist/js/plugins`
- Repeat

## Guidelines

This repo's purpose is **exclusively** providing a basic structure for other
plugin repos.
It is **not** the place to create core functionality! (i.e. no application
code here!)

Changes to this repo **must not** demand that repos derived from it be changed, but it **should** be possible to update them to a more recent version of the
archetype fairly easily.