rpgmakerh4-buildtool-mz

0.0.5 • Public • Published

Install

npm i rpgmakerh4-buildtool-mz

Example

const { BuildToolMZWin } = require("rpgmakerh4-buildtool-mz");
const path = require("path");

(async () => {
    const mzSrcFolder = path.join(__dirname, "MZBuildSample"); //your mz folder path to publish
    const outFolder = path.join(__dirname, "dist", "MyGame_0_0_2");
    const mzPublishFolder = path.join(outFolder, "MyGame");

    //start
    const aBuildToolMZ = new BuildToolMZWin();
    //const aBuildToolMZ = new BuildToolMZWin(null, null, null);
    //const aBuildToolMZ = new BuildToolMZWin(null, "00000000000000000000000000000000", null); 00000000000000000000000000000000 is your encryptionKey

    console.log("downloading zip...");
    await aBuildToolMZ.downloadRPGMakerMZLiteAsync();

    console.log("extracting zip...");
    await aBuildToolMZ.extractZipAsync();

    await aBuildToolMZ.copyBaseFilesAsync(mzPublishFolder);
    await aBuildToolMZ.copySrcMzFilesAsync(mzSrcFolder, mzPublishFolder, [
        /\.js\.map$/
    ]);
    await aBuildToolMZ.processPackageJsonAsync(mzSrcFolder, mzPublishFolder);
    await aBuildToolMZ.processSystemJsonAsync(mzSrcFolder, mzPublishFolder);
    await aBuildToolMZ.processAudiosAndImgsAsync(mzSrcFolder, mzPublishFolder);

    //other file you want. like credits.txt, readme.txt
    await aBuildToolMZ.copyFileToDestFolderAsync(path.join(__dirname, "docs", "README.md"), outFolder);

    console.log(`${outFolder} is being compressed...`);
    await aBuildToolMZ.zipFolderAsync(outFolder);
})();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.50latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.50
0.0.41
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i rpgmakerh4-buildtool-mz

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

11.6 kB

Total Files

3

Last publish

Collaborators

  • h4cander