Skip to content

Commit fafcad8

Browse files
Initial commit
0 parents  commit fafcad8

12 files changed

+3438
-0
lines changed

.eslintrc.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
parserOptions: {
4+
ecmaVersion: 2020,
5+
sourceType: "module"
6+
},
7+
extends: [
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
rules: {
11+
"brace-style": ["error", "allman", { "allowSingleLine": true }]
12+
}
13+
};

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
dist/

LICENSE

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
zlib License
2+
3+
This software is provided 'as-is', without any express or implied
4+
warranty. In no event will the authors be held liable for any damages
5+
arising from the use of this software.
6+
7+
Permission is granted to anyone to use this software for any purpose,
8+
including commercial applications, and to alter it and redistribute it
9+
freely, subject to the following restrictions:
10+
11+
1. The origin of this software must not be misrepresented; you must not
12+
claim that you wrote the original software. If you use this software
13+
in a product, an acknowledgment in the product documentation would be
14+
appreciated but is not required.
15+
2. Altered source versions must be plainly marked as such, and must not be
16+
misrepresented as being the original software.
17+
3. This notice may not be removed or altered from any source distribution.

README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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.

header.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//=============================================================================
2+
// RMMZ - Typescript Plugin Archetype
3+
//=============================================================================
4+
5+
/*:
6+
*
7+
* @target MZ
8+
* @plugindesc Typescript Plugin Archetype.
9+
* @author Comuns
10+
*
11+
* @help Typescript Plugin Archetype.
12+
*
13+
* This is a plugin archetype, it does not provide any functionality, only a
14+
* template for other plugins.
15+
*
16+
*/
17+
18+
//=============================================================================
19+
// ** NOTICE **
20+
//-----------------------------------------------------------------------------
21+
// The code below is generated by a compiler, and is not well suited for human
22+
// reading. If you are interested on the source code, please take a look at
23+
// the Github repository for this plugin!
24+
//=============================================================================

0 commit comments

Comments
 (0)