spawnpack 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/spawnpack.js +8 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,9 +122,11 @@ Spawnpack fetches the latest stable npm versions for:
|
|
|
122
122
|
- `@minecraft/vanilla-data`
|
|
123
123
|
- `@minecraft/math`
|
|
124
124
|
|
|
125
|
-
If version lookup fails, it falls back to baked stable defaults.
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
If version lookup fails, it falls back to baked stable defaults.
|
|
126
|
+
|
|
127
|
+
Only runtime Script API modules, currently `@minecraft/server` and `@minecraft/server-ui`, are written to the behavior pack manifest. npm-side libraries such as `@minecraft/vanilla-data` and `@minecraft/math` stay in the generated `package.json` for imports and bundling.
|
|
128
|
+
|
|
129
|
+
## Development
|
|
128
130
|
|
|
129
131
|
```bash
|
|
130
132
|
bun install
|
package/dist/spawnpack.js
CHANGED
|
@@ -1586,7 +1586,7 @@ var PACK_VERSION = [1, 0, 0];
|
|
|
1586
1586
|
function getAuthors(author) {
|
|
1587
1587
|
return author.trim() === "" ? [] : [author];
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function getManifestScriptDependencies(config, versions) {
|
|
1590
1590
|
const dependencies = [];
|
|
1591
1591
|
if (config.scriptPackages.server) {
|
|
1592
1592
|
dependencies.push({ module_name: "@minecraft/server", version: versions.server });
|
|
@@ -1594,12 +1594,6 @@ function getScriptDependencies(config, versions) {
|
|
|
1594
1594
|
if (config.scriptPackages.serverUi) {
|
|
1595
1595
|
dependencies.push({ module_name: "@minecraft/server-ui", version: versions.serverUi });
|
|
1596
1596
|
}
|
|
1597
|
-
if (config.scriptPackages.vanillaData) {
|
|
1598
|
-
dependencies.push({ module_name: "@minecraft/vanilla-data", version: versions.vanillaData });
|
|
1599
|
-
}
|
|
1600
|
-
if (config.scriptPackages.math) {
|
|
1601
|
-
dependencies.push({ module_name: "@minecraft/math", version: versions.math });
|
|
1602
|
-
}
|
|
1603
1597
|
return dependencies;
|
|
1604
1598
|
}
|
|
1605
1599
|
function getBpModules(config) {
|
|
@@ -1618,7 +1612,7 @@ function getBpModules(config) {
|
|
|
1618
1612
|
function generateBpManifest(config, bpUuid, rpUuid, versions) {
|
|
1619
1613
|
const dependencies = [{ uuid: rpUuid, version: PACK_VERSION }];
|
|
1620
1614
|
if (config.scripting !== "none") {
|
|
1621
|
-
dependencies.push(...
|
|
1615
|
+
dependencies.push(...getManifestScriptDependencies(config, versions));
|
|
1622
1616
|
}
|
|
1623
1617
|
return {
|
|
1624
1618
|
format_version: VERSIONS.manifestFormat,
|
|
@@ -1914,6 +1908,11 @@ Add your own API keys before using the MCP tools:
|
|
|
1914
1908
|
|
|
1915
1909
|
Update the placeholder values in \`.mcp.json\` with your own tokens.
|
|
1916
1910
|
|
|
1911
|
+
` : "";
|
|
1912
|
+
const scriptPackageSection = config.scripting !== "none" ? `## Script Packages
|
|
1913
|
+
|
|
1914
|
+
Selected npm packages are installed through \`package.json\`. Only runtime Script API modules such as \`@minecraft/server\` and \`@minecraft/server-ui\` are written to \`packs/BP/manifest.json\`; npm-side libraries such as \`@minecraft/vanilla-data\` and \`@minecraft/math\` are imported and bundled from \`package.json\`.
|
|
1915
|
+
|
|
1917
1916
|
` : "";
|
|
1918
1917
|
return `# ${config.projectName}
|
|
1919
1918
|
|
|
@@ -1938,7 +1937,7 @@ ${config.scripting === "none" ? "This project was generated without Script API s
|
|
|
1938
1937
|
- Add additional JavaScript files beside \`main.js\` and import them from there.
|
|
1939
1938
|
- Minecraft copies the BP/RP content directly into \`com.mojang\`, so there is no TypeScript compile step.`}
|
|
1940
1939
|
|
|
1941
|
-
${config.useRgl ? `## rgl Workflow
|
|
1940
|
+
${scriptPackageSection}${config.useRgl ? `## rgl Workflow
|
|
1942
1941
|
|
|
1943
1942
|
- \`rgl watch\` rebuilds your scripts and exports your add-on while you work.
|
|
1944
1943
|
- \`rgl run\` builds a development export once.
|