@spicemod/creator 0.0.24 → 0.0.25
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/bin.mjs +7 -5
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -143,7 +143,7 @@ const customAppEntryFilePath = dist("templates/customAppEntry.js", import.meta.u
|
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region package.json
|
|
145
145
|
var name = "@spicemod/creator";
|
|
146
|
-
var version = "0.0.
|
|
146
|
+
var version = "0.0.25";
|
|
147
147
|
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region src/utils/common.ts
|
|
@@ -667,7 +667,7 @@ function resolveDefaultIcon(cwd) {
|
|
|
667
667
|
cwd,
|
|
668
668
|
absolute: true
|
|
669
669
|
});
|
|
670
|
-
if (matches.length > 0 && matches[0]) return
|
|
670
|
+
if (matches.length > 0 && matches[0]) return matches[0];
|
|
671
671
|
}
|
|
672
672
|
const expectedFiles = ICON_GLOBS.map((g) => ` - ${g}`).join("\n");
|
|
673
673
|
throw new Error(`No icon file found in your project.\nPlease create one of the following files:\n${expectedFiles}`);
|
|
@@ -678,7 +678,7 @@ function resolveActiveIcon(cwd) {
|
|
|
678
678
|
cwd,
|
|
679
679
|
absolute: true
|
|
680
680
|
});
|
|
681
|
-
if (matches.length > 0 && matches[0]) return
|
|
681
|
+
if (matches.length > 0 && matches[0]) return matches[0];
|
|
682
682
|
}
|
|
683
683
|
return "";
|
|
684
684
|
}
|
|
@@ -2135,13 +2135,15 @@ const render = () => {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
});
|
|
2137
2137
|
writeFileSync(extensionJsPath, extensionCode);
|
|
2138
|
+
const icon = readFileSync(config.icon.default).toString();
|
|
2139
|
+
const activeIcon = config.icon.active ? readFileSync(config.icon.active).toString() : icon;
|
|
2138
2140
|
const manifestPath = resolve(destDir, "manifest.json");
|
|
2139
2141
|
const manifest = {
|
|
2140
2142
|
name: config.name,
|
|
2141
2143
|
subfiles: [],
|
|
2142
2144
|
subfiles_extension: [outFiles.jsExtension ?? "extension.js"],
|
|
2143
|
-
icon
|
|
2144
|
-
|
|
2145
|
+
icon,
|
|
2146
|
+
activeIcon
|
|
2145
2147
|
};
|
|
2146
2148
|
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
|
|
2147
2149
|
if (spiceConfig) {
|