@spicemod/creator 0.0.31 → 0.0.32

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 CHANGED
@@ -145,7 +145,7 @@ const injectCSSFilePath = dist("templates/injectCSS.js", import.meta.url);
145
145
  //#endregion
146
146
  //#region package.json
147
147
  var name = "@spicemod/creator";
148
- var version = "0.0.31";
148
+ var version = "0.0.32";
149
149
 
150
150
  //#endregion
151
151
  //#region src/utils/common.ts
@@ -1047,7 +1047,6 @@ function wrapWithLoader({ config, cache, outFiles, server, dev = false, logger =
1047
1047
  const outdir = resolve(build$3.initialOptions.outdir || "./dist");
1048
1048
  const bundledCss = getBundledCss(res.outputFiles, outdir, type, dev);
1049
1049
  const minify = build$3.initialOptions.minify;
1050
- const slug = varSlugify(`${name}_${version}`);
1051
1050
  const currentFilePaths = /* @__PURE__ */ new Set();
1052
1051
  for (const file of res.outputFiles) {
1053
1052
  const isJs = file.path.endsWith(".js");
@@ -1146,7 +1145,6 @@ function wrapWithLoader({ config, cache, outFiles, server, dev = false, logger =
1146
1145
  define: {
1147
1146
  __ESBUILD__HAS_CSS: JSON.stringify(type !== "theme" && bundledCss.length !== 0),
1148
1147
  __ESBUILD__INJECTED_CSS: JSON.stringify(bundledCss),
1149
- __ESBUILD__APP_SLUG: JSON.stringify(slug),
1150
1148
  __ESBUILD__APP_TYPE: JSON.stringify(type),
1151
1149
  __ESBUILD__APP_ID: JSON.stringify(varSlugify(name)),
1152
1150
  __ESBUILD__APP_VERSION: JSON.stringify(version)
@@ -2314,8 +2312,7 @@ function getJSDevOptions(config, options) {
2314
2312
  minify,
2315
2313
  buildOptions: {
2316
2314
  copy: true,
2317
- apply: false,
2318
- applyOnce: false,
2315
+ apply: true,
2319
2316
  remove: config.template !== "custom-app",
2320
2317
  outDir
2321
2318
  },
@@ -6,16 +6,9 @@ __ESBUILD__HAS_CSS &&
6
6
  style.setAttribute("data-app", __ESBUILD__APP_ID);
7
7
  style.textContent = css;
8
8
  document.head.appendChild(style);
9
- } catch {}
9
+ } catch { }
10
10
  })();
11
11
  (async () => {
12
- const _ID = `${__ESBUILD__APP_SLUG}-${__ESBUILD__APP_TYPE}`;
13
- if (!window.SpiceGlobals) window.SpiceGlobals = {};
14
- window.SpiceGlobals[_ID] = {
15
- id: __ESBUILD__APP_ID,
16
- version: __ESBUILD__APP_VERSION,
17
- };
18
- const { id: appId, version: v } = window.SpiceGlobals[_ID];
19
12
  const _wait = (p, a = 0) =>
20
13
  new Promise((res, rej) => {
21
14
  const i = setInterval(() => {
@@ -29,7 +22,7 @@ __ESBUILD__HAS_CSS &&
29
22
  if (S.Events?.webpackLoaded?.on) await new Promise((r) => S.Events.webpackLoaded.on(r));
30
23
  await _wait(() => S?.React && S?.ReactJSX && S?.ReactDOM && S?.Platform && S?.Player);
31
24
  // oxfmt-ignore
32
- console.info(`%c[${appId}] %cv${v} %cinitialized`, "color: #1DB954; font-weight: bold", "color: #888", "color: unset");
25
+ console.info(`%c[${__ESBUILD__APP_ID}:${__ESBUILD__APP_TYPE}] %cv${__ESBUILD__APP_VERSION} %cinitialized`, "color: #1DB954; font-weight: bold", "color: #888", "color: unset");
33
26
  // oxfmt-ignore
34
27
  "{{INJECT_START_COMMENT}}"
35
28
  (async function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicemod/creator",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "Easily make Spicetify extensions and themes",
5
5
  "keywords": [
6
6
  "cli",
@@ -6,16 +6,9 @@ __ESBUILD__HAS_CSS &&
6
6
  style.setAttribute("data-app", __ESBUILD__APP_ID);
7
7
  style.textContent = css;
8
8
  document.head.appendChild(style);
9
- } catch {}
9
+ } catch { }
10
10
  })();
11
11
  (async () => {
12
- const _ID = `${__ESBUILD__APP_SLUG}-${__ESBUILD__APP_TYPE}`;
13
- if (!window.SpiceGlobals) window.SpiceGlobals = {};
14
- window.SpiceGlobals[_ID] = {
15
- id: __ESBUILD__APP_ID,
16
- version: __ESBUILD__APP_VERSION,
17
- };
18
- const { id: appId, version: v } = window.SpiceGlobals[_ID];
19
12
  const _wait = (p, a = 0) =>
20
13
  new Promise((res, rej) => {
21
14
  const i = setInterval(() => {
@@ -29,7 +22,7 @@ __ESBUILD__HAS_CSS &&
29
22
  if (S.Events?.webpackLoaded?.on) await new Promise((r) => S.Events.webpackLoaded.on(r));
30
23
  await _wait(() => S?.React && S?.ReactJSX && S?.ReactDOM && S?.Platform && S?.Player);
31
24
  // oxfmt-ignore
32
- console.info(`%c[${appId}] %cv${v} %cinitialized`, "color: #1DB954; font-weight: bold", "color: #888", "color: unset");
25
+ console.info(`%c[${__ESBUILD__APP_ID}:${__ESBUILD__APP_TYPE}] %cv${__ESBUILD__APP_VERSION} %cinitialized`, "color: #1DB954; font-weight: bold", "color: #888", "color: unset");
33
26
  // oxfmt-ignore
34
27
  "{{INJECT_START_COMMENT}}"
35
28
  (async function () {