Compare commits

..

2 Commits

Author SHA1 Message Date
github-actions[bot]
18a970541d Sync to Pumpkin-MC/pumpkin-plugin-wit@39bf330 2026-09-28 07:47:45 +00:00
Demetrius Kanios
dcd04be1bf Use componentize-qjs instead. 2026-09-22 22:06:51 -07:00
4 changed files with 2227 additions and 622 deletions

2824
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -20,10 +20,10 @@
"prepare": "jco guest-types wit/v0.1 -n plugin -o dist/bindings --name index"
},
"dependencies": {
"@bytecodealliance/componentize-js": "^0.21.0",
"esbuild": "^0.28.0"
"componentize-qjs": "^0.4.5",
"esbuild": "^0.28.2"
},
"devDependencies": {
"@bytecodealliance/jco": "^1.19.0"
"@bytecodealliance/jco": "^1.34.0"
}
}

View File

@ -1,10 +1,7 @@
#! /usr/bin/env node
import * as esbuild from "esbuild";
import {
componentize,
version as componentize_version,
} from "@bytecodealliance/componentize-js";
import { componentize } from "componentize-qjs";
import * as path from "node:path";
import * as fs from "node:fs";
@ -22,14 +19,14 @@ async function buildPlugin(entryPath, outputPath, witDir) {
external: ["pumpkin:plugin/*"],
});
console.log(
`2. Running through \`componentize-js\` ` + componentize_version + `...`,
);
console.log(`2. Running through \`componentize-qjs\`...`);
try {
const { component } = await componentize({
worldName: "plugin",
witPath: witDir,
sourcePath: tempJs
jsSource: fs.readFileSync(tempJs, "utf8"),
optSize: true,
minify: true,
});
fs.writeFileSync(outputPath, component);
@ -54,9 +51,7 @@ if (args.length < 2) {
const entry = args[0];
const output = args[1];
const wit =
args[2] ||
path.join(import.meta.dirname, "../wit/v0.1");
const wit = args[2] || path.join(import.meta.dirname, "../wit/v0.1");
buildPlugin(entry, output, wit).catch((err) => {
console.error(err);

2
wit

@ -1 +1 @@
Subproject commit 4d7a501943bb99f0f02a339128833f58ed37d0cc
Subproject commit 39bf330fa6aefc91c8ac61bd07d0fdbd5a5b95ac