@spicemod/creator 0.0.21 → 0.0.22

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.
Files changed (2) hide show
  1. package/dist/bin.mjs +4 -3
  2. package/package.json +1 -1
package/dist/bin.mjs CHANGED
@@ -135,7 +135,7 @@ const templateFilePath = dist("templates/wrapper.js", import.meta.url);
135
135
  //#endregion
136
136
  //#region package.json
137
137
  var name = "@spicemod/creator";
138
- var version = "0.0.21";
138
+ var version = "0.0.22";
139
139
 
140
140
  //#endregion
141
141
  //#region src/utils/common.ts
@@ -454,6 +454,7 @@ async function resolveContext(config) {
454
454
  if (!config.entry.js || config.entry.js.length === 0) config.entry.js = resolveDefaultEntries(cwd, "js");
455
455
  if (!config.entry.css || config.entry.css.length === 0) config.entry.css = resolveDefaultEntries(cwd, "css");
456
456
  } else config.entry = resolveDefaultEntries(cwd, "js");
457
+ if (!config.devModeVarName) config.devModeVarName = DEV_MODE_VAR_NAME;
457
458
  config.outDir = resolve(cwd, config.outDir || "./dist");
458
459
  config.esbuildOptions ??= {};
459
460
  config.serverConfig ??= {};
@@ -948,7 +949,7 @@ function getJSBuildOptions(config, options) {
948
949
  ],
949
950
  define: {
950
951
  [DEV_MODE_VAR_NAME]: "false",
951
- ...config.devModeVarName ? { [config.devModeVarName]: "false" } : {},
952
+ [config.devModeVarName]: "false",
952
953
  ...config.esbuildOptions.define
953
954
  },
954
955
  plugins: [...config.esbuildOptions?.plugins ? config.esbuildOptions.plugins : [], ...getCommonPlugins({
@@ -1733,7 +1734,7 @@ function getJSDevOptions(config, options) {
1733
1734
  ],
1734
1735
  define: {
1735
1736
  [DEV_MODE_VAR_NAME]: "true",
1736
- ...config.devModeVarName ? { [config.devModeVarName]: "true" } : {},
1737
+ [config.devModeVarName]: "true",
1737
1738
  ...config.esbuildOptions.define
1738
1739
  },
1739
1740
  plugins: [...config.esbuildOptions?.plugins ? config.esbuildOptions.plugins : [], ...getCommonPlugins({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicemod/creator",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Easily make Spicetify extensions and themes",
5
5
  "keywords": [
6
6
  "cli",