|
| 1 | +# RPG Maker MZ - Typescript Plugin Archetype |
| 2 | + |
| 3 | +This is a template repository for writing Typescript plugins for RPG Maker MZ. |
| 4 | +The main purpose here is to set a basis from which other repositories can |
| 5 | +derive from and more easily be ready to start actual development. |
| 6 | + |
| 7 | + |
| 8 | +## Getting Started |
| 9 | + |
| 10 | +First of all, make sure you run `npm install` to install all the dependencies |
| 11 | +for the project, such as [rollup.js](https://rollupjs.org/) and typescript. |
| 12 | + |
| 13 | +Make sure to set `package.json` up correctly, changing the package name to that |
| 14 | +of your plugin (this will be used to generate the output file) and adjust the |
| 15 | +values of the `version` and `description` fields (and, optionally, `keywords`). |
| 16 | +Also make sure to add a property `testProjectDir` if you want to test your |
| 17 | +plugin (can be relative). |
| 18 | + |
| 19 | +To configure plugin parameters and the likes, change `header.js`. This file is |
| 20 | +prepended to the generated output after the build process. |
| 21 | + |
| 22 | +Once you are done, `npm run build` will create a JS file for your plugin as |
| 23 | +`dist/js/plugins/{pkg.name}.js`. |
| 24 | + |
| 25 | +**TL;DR**: |
| 26 | + |
| 27 | +First: |
| 28 | +- `npm install` |
| 29 | +- Modify `package.json` |
| 30 | + |
| 31 | +Then: |
| 32 | +- Modify `header.js` and write Typescript code on `src` |
| 33 | +- `npm run build` |
| 34 | +- Your plugin shows up compiled in `dist/js/plugins` |
| 35 | +- Repeat |
| 36 | + |
| 37 | + |
| 38 | +## Guidelines |
| 39 | + |
| 40 | +This repo's purpose is **exclusively** providing a basic structure for other |
| 41 | +plugin repos. |
| 42 | +It is **not** the place to create core functionality! (i.e. no application |
| 43 | +code here!) |
| 44 | + |
| 45 | +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 |
| 46 | +archetype fairly easily. |
0 commit comments