bluedither 1.0.22 → 1.0.23

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.
@@ -161,7 +161,24 @@ function autoWireVitePlugin(targetDir) {
161
161
  const p = resolve(targetDir, v);
162
162
  if (existsSync(p)) { configPath = p; break; }
163
163
  }
164
- if (!configPath) return;
164
+
165
+ // No vite config exists — check if vite is available and create one
166
+ if (!configPath) {
167
+ const pkgPath = resolve(targetDir, 'package.json');
168
+ const hasVite = existsSync(pkgPath) &&
169
+ JSON.parse(readFileSync(pkgPath, 'utf-8')).devDependencies?.vite;
170
+
171
+ if (hasVite) {
172
+ // Vite is installed but no config — create a minimal one with the plugin
173
+ configPath = resolve(targetDir, 'vite.config.js');
174
+ writeFileSync(configPath, `import { bluedither } from './bluedither/dev-middleware.js'\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n plugins: [bluedither()],\n})\n`);
175
+ console.log(`Created vite.config.js with BlueDither plugin`);
176
+ return;
177
+ }
178
+
179
+ // No vite at all — nothing to wire
180
+ return;
181
+ }
165
182
 
166
183
  const config = readFileSync(configPath, 'utf-8');
167
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluedither",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "A bold, dithered-shader hero theme for Claude Code — skill + fine-tuner",
5
5
  "type": "module",
6
6
  "bin": {