asajs 3.0.4 → 3.0.5
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/dist/cjs/compilers/Config.js +2 -2
- package/dist/cjs/compilers/PreCompile.js +1 -1
- package/dist/cjs/compilers/generator/LangBuilder.js +1 -1
- package/dist/cjs/compilers/generator/Template.js +1 -1
- package/dist/cjs/template.js +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/types/template.d.ts +1 -1
- package/package.json +1 -1
|
@@ -50,8 +50,8 @@ const defaultConfig = {
|
|
|
50
50
|
installPath: void 0
|
|
51
51
|
},
|
|
52
52
|
manifest: {
|
|
53
|
-
name: "
|
|
54
|
-
description: "Build with
|
|
53
|
+
name: "AsaJS",
|
|
54
|
+
description: "Build with AsaJS <3",
|
|
55
55
|
uuid: import_Save.Save.uuid()[0],
|
|
56
56
|
version: [1, 0, 0],
|
|
57
57
|
baseGameVersion: [1, 21, 80]
|
|
@@ -57,7 +57,7 @@ console.timeEnd = function(label) {
|
|
|
57
57
|
delete timeMap[label];
|
|
58
58
|
};
|
|
59
59
|
function WritePreComment(data) {
|
|
60
|
-
const comment = "This file is generated by the
|
|
60
|
+
const comment = "This file is generated by the AsaJS compiler. Do not edit it directly.";
|
|
61
61
|
if (import_fs.default.readFileSync("comment.txt", "utf-8").trim() !== "") {
|
|
62
62
|
const info = import_fs.default.readFileSync("comment.txt", "utf-8").replaceAll("\n", "\n * ");
|
|
63
63
|
return "/*\n * ".concat(comment, "\n * ----------------------------------------------------------------------\n * ").concat(info, "\n */\n").concat(JSON.stringify(
|
|
@@ -39,7 +39,7 @@ class LangBuilder extends import_Class.Class {
|
|
|
39
39
|
import_fs.default.mkdirSync("".concat(buildPath, "/texts"), { recursive: true });
|
|
40
40
|
for (const langFile in import_LocalizeText.localizeText) {
|
|
41
41
|
const langContent = import_LocalizeText.localizeText[langFile];
|
|
42
|
-
let text = "## The entire text below is built entirely using
|
|
42
|
+
let text = "## The entire text below is built entirely using AsaJS!";
|
|
43
43
|
for (const key in langContent) {
|
|
44
44
|
text += "\n".concat(key, "=").concat(langContent[key]);
|
|
45
45
|
}
|
|
@@ -37,7 +37,7 @@ var import_fs = __toESM(require("fs"));
|
|
|
37
37
|
function firstRun() {
|
|
38
38
|
const template = {
|
|
39
39
|
".gitignore": import_template.gitignore,
|
|
40
|
-
"asakiyuki.config.cjs": import_template.config.replace("{packname}", "
|
|
40
|
+
"asakiyuki.config.cjs": import_template.config.replace("{packname}", "AsaJS").replace("{packdescription}", "Build with AsaJS <3").replace("{autoinstall}", "true").replace("{development}", "true").replace("{preview}", "false"),
|
|
41
41
|
"asakiyuki.global_variables.cjs": import_template.globalVariables,
|
|
42
42
|
"asakiyuki.env.cjs": import_template.env
|
|
43
43
|
};
|
package/dist/cjs/template.js
CHANGED
|
@@ -26,7 +26,7 @@ __export(template_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(template_exports);
|
|
27
27
|
const env = "const env = {};\n\nmodule.exports = { env };";
|
|
28
28
|
const globalVariables = 'const {} = require("asajs");\n\nconst global_variables = {};\n\nmodule.exports = { global_variables };';
|
|
29
|
-
const config = '/**\n * Configuration object for the
|
|
29
|
+
const config = '/**\n * Configuration object for the AsaJS build process.\n * @type {import(\'asajs\').Config}\n */\nconst config = {\n compiler: {\n autoCompress: false,\n fileExtension: "json",\n encodeJson: false,\n UI: {\n nameLength: 32,\n namespaceAmount: 16,\n namespaceLength: 32,\n obfuscateName: false,\n obfuscateType: false,\n },\n },\n installer: {\n autoInstall: true,\n developEvironment: true,\n previewVersion: false,\n customPath: false,\n installPath: "/your/minecraft/data/path",\n },\n manifest: {\n name: "AsaJS",\n description: "Build with AsaJS <3",\n },\n};\n\nmodule.exports = { config }';
|
|
30
30
|
const gitignore = "# Node packages\nnode_modules\n\n# Build Folders\n.minecraft\n.build\n.save\n\n# Build variables\nasakiyuki.env.cjs\n\n# Compress package\nMinecraft-UIBuild.mcpack";
|
|
31
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
32
|
0 && (module.exports = {
|
package/dist/esm/index.js
CHANGED
|
@@ -3053,7 +3053,7 @@ var Obj = class extends Class {
|
|
|
3053
3053
|
// src/template.ts
|
|
3054
3054
|
var env = "const env = {};\n\nmodule.exports = { env };";
|
|
3055
3055
|
var globalVariables = 'const {} = require("asajs");\n\nconst global_variables = {};\n\nmodule.exports = { global_variables };';
|
|
3056
|
-
var config = '/**\n * Configuration object for the
|
|
3056
|
+
var config = '/**\n * Configuration object for the AsaJS build process.\n * @type {import(\'asajs\').Config}\n */\nconst config = {\n compiler: {\n autoCompress: false,\n fileExtension: "json",\n encodeJson: false,\n UI: {\n nameLength: 32,\n namespaceAmount: 16,\n namespaceLength: 32,\n obfuscateName: false,\n obfuscateType: false,\n },\n },\n installer: {\n autoInstall: true,\n developEvironment: true,\n previewVersion: false,\n customPath: false,\n installPath: "/your/minecraft/data/path",\n },\n manifest: {\n name: "AsaJS",\n description: "Build with AsaJS <3",\n },\n};\n\nmodule.exports = { config }';
|
|
3057
3057
|
var gitignore = "# Node packages\nnode_modules\n\n# Build Folders\n.minecraft\n.build\n.save\n\n# Build variables\nasakiyuki.env.cjs\n\n# Compress package\nMinecraft-UIBuild.mcpack";
|
|
3058
3058
|
|
|
3059
3059
|
// src/compilers/generator/GenerateDir.ts
|
|
@@ -3077,7 +3077,7 @@ import fs3 from "fs";
|
|
|
3077
3077
|
function firstRun() {
|
|
3078
3078
|
const template = {
|
|
3079
3079
|
".gitignore": gitignore,
|
|
3080
|
-
"asakiyuki.config.cjs": config.replace("{packname}", "
|
|
3080
|
+
"asakiyuki.config.cjs": config.replace("{packname}", "AsaJS").replace("{packdescription}", "Build with AsaJS <3").replace("{autoinstall}", "true").replace("{development}", "true").replace("{preview}", "false"),
|
|
3081
3081
|
"asakiyuki.global_variables.cjs": globalVariables,
|
|
3082
3082
|
"asakiyuki.env.cjs": env
|
|
3083
3083
|
};
|
|
@@ -3112,8 +3112,8 @@ var defaultConfig = {
|
|
|
3112
3112
|
installPath: void 0
|
|
3113
3113
|
},
|
|
3114
3114
|
manifest: {
|
|
3115
|
-
name: "
|
|
3116
|
-
description: "Build with
|
|
3115
|
+
name: "AsaJS",
|
|
3116
|
+
description: "Build with AsaJS <3",
|
|
3117
3117
|
uuid: Save.uuid()[0],
|
|
3118
3118
|
version: [1, 0, 0],
|
|
3119
3119
|
baseGameVersion: [1, 21, 80]
|
|
@@ -3216,7 +3216,7 @@ console.timeEnd = function(label) {
|
|
|
3216
3216
|
delete timeMap[label];
|
|
3217
3217
|
};
|
|
3218
3218
|
function WritePreComment(data) {
|
|
3219
|
-
const comment = "This file is generated by the
|
|
3219
|
+
const comment = "This file is generated by the AsaJS compiler. Do not edit it directly.";
|
|
3220
3220
|
if (fs4.readFileSync("comment.txt", "utf-8").trim() !== "") {
|
|
3221
3221
|
const info = fs4.readFileSync("comment.txt", "utf-8").replaceAll("\n", "\n * ");
|
|
3222
3222
|
return "/*\n * ".concat(comment, "\n * ----------------------------------------------------------------------\n * ").concat(info, "\n */\n").concat(JSON.stringify(
|
|
@@ -68170,7 +68170,7 @@ var LangBuilder = class extends Class {
|
|
|
68170
68170
|
fs11.mkdirSync("".concat(buildPath, "/texts"), { recursive: true });
|
|
68171
68171
|
for (const langFile in localizeText) {
|
|
68172
68172
|
const langContent = localizeText[langFile];
|
|
68173
|
-
let text = "## The entire text below is built entirely using
|
|
68173
|
+
let text = "## The entire text below is built entirely using AsaJS!";
|
|
68174
68174
|
for (const key in langContent) {
|
|
68175
68175
|
text += "\n".concat(key, "=").concat(langContent[key]);
|
|
68176
68176
|
}
|
package/dist/types/template.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const env = "const env = {};\n\nmodule.exports = { env };";
|
|
2
2
|
export declare const globalVariables = "const {} = require(\"asajs\");\n\nconst global_variables = {};\n\nmodule.exports = { global_variables };";
|
|
3
|
-
export declare const config = "/**\n * Configuration object for the
|
|
3
|
+
export declare const config = "/**\n * Configuration object for the AsaJS build process.\n * @type {import('asajs').Config}\n */\nconst config = {\n compiler: {\n autoCompress: false,\n fileExtension: \"json\",\n encodeJson: false,\n UI: {\n nameLength: 32,\n namespaceAmount: 16,\n namespaceLength: 32,\n obfuscateName: false,\n obfuscateType: false,\n },\n },\n installer: {\n autoInstall: true,\n developEvironment: true,\n previewVersion: false,\n customPath: false,\n installPath: \"/your/minecraft/data/path\",\n },\n manifest: {\n name: \"AsaJS\",\n description: \"Build with AsaJS <3\",\n },\n};\n\nmodule.exports = { config }";
|
|
4
4
|
export declare const gitignore = "# Node packages\nnode_modules\n\n# Build Folders\n.minecraft\n.build\n.save\n\n# Build variables\nasakiyuki.env.cjs\n\n# Compress package\nMinecraft-UIBuild.mcpack";
|
package/package.json
CHANGED