bluedither 1.0.23 → 1.0.24
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/cli/commands/install.js +41 -0
- package/package.json +1 -1
package/cli/commands/install.js
CHANGED
|
@@ -121,6 +121,26 @@ export default async function install(args) {
|
|
|
121
121
|
|
|
122
122
|
console.log(`Copied ${copied} files to ${bdDir}`);
|
|
123
123
|
|
|
124
|
+
// Also copy tuner assets + tokens to public/bluedither/ for Vite projects
|
|
125
|
+
const publicBdDir = resolve(targetDir, 'public', 'bluedither');
|
|
126
|
+
if (existsSync(resolve(targetDir, 'public')) || existsSync(resolve(targetDir, 'vite.config.js')) || existsSync(resolve(targetDir, 'vite.config.ts'))) {
|
|
127
|
+
mkdirSync(publicBdDir, { recursive: true });
|
|
128
|
+
const publicFiles = [
|
|
129
|
+
[resolve(bdDir, 'bluedither-tuner.js'), 'bluedither-tuner.js'],
|
|
130
|
+
[resolve(bdDir, 'bluedither-tuner.css'), 'bluedither-tuner.css'],
|
|
131
|
+
[resolve(bdDir, 'bluedither-tuner-inject.js'), 'bluedither-tuner-inject.js'],
|
|
132
|
+
[resolve(bdDir, 'tokens.json'), 'tokens.json'],
|
|
133
|
+
[resolve(bdDir, 'tokens.defaults.json'), 'tokens.defaults.json'],
|
|
134
|
+
[resolve(bdDir, 'dev-middleware.js'), 'dev-middleware.js'],
|
|
135
|
+
];
|
|
136
|
+
for (const [srcPath, destName] of publicFiles) {
|
|
137
|
+
if (existsSync(srcPath)) {
|
|
138
|
+
copyFileSync(srcPath, resolve(publicBdDir, destName));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
console.log(`Copied tuner assets to public/bluedither/`);
|
|
142
|
+
}
|
|
143
|
+
|
|
124
144
|
// Auto-wire Vite plugin if vite.config exists
|
|
125
145
|
autoWireVitePlugin(targetDir);
|
|
126
146
|
|
|
@@ -269,6 +289,27 @@ async function installFromRegistry(slug, targetDir) {
|
|
|
269
289
|
}
|
|
270
290
|
}
|
|
271
291
|
|
|
292
|
+
// Also copy tuner assets + tokens to public/bluedither/ for Vite projects
|
|
293
|
+
// This saves the AI agent from having to do this step manually
|
|
294
|
+
const publicBdDir = resolve(targetDir, 'public', 'bluedither');
|
|
295
|
+
if (existsSync(resolve(targetDir, 'public')) || existsSync(resolve(targetDir, 'vite.config.js')) || existsSync(resolve(targetDir, 'vite.config.ts'))) {
|
|
296
|
+
mkdirSync(publicBdDir, { recursive: true });
|
|
297
|
+
const publicFiles = [
|
|
298
|
+
[resolve(bdDir, 'bluedither-tuner.js'), 'bluedither-tuner.js'],
|
|
299
|
+
[resolve(bdDir, 'bluedither-tuner.css'), 'bluedither-tuner.css'],
|
|
300
|
+
[resolve(bdDir, 'bluedither-tuner-inject.js'), 'bluedither-tuner-inject.js'],
|
|
301
|
+
[resolve(bdDir, 'tokens.json'), 'tokens.json'],
|
|
302
|
+
[resolve(bdDir, 'tokens.defaults.json'), 'tokens.defaults.json'],
|
|
303
|
+
[resolve(bdDir, 'dev-middleware.js'), 'dev-middleware.js'],
|
|
304
|
+
];
|
|
305
|
+
for (const [srcPath, destName] of publicFiles) {
|
|
306
|
+
if (existsSync(srcPath)) {
|
|
307
|
+
copyFileSync(srcPath, resolve(publicBdDir, destName));
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
console.log(` Copied tuner assets to public/bluedither/`);
|
|
311
|
+
}
|
|
312
|
+
|
|
272
313
|
// Detect framework and create Claude Code command
|
|
273
314
|
const { framework, typescript } = detectFramework(targetDir);
|
|
274
315
|
console.log(` Detected framework: ${framework}${typescript ? ' + TypeScript' : ''}`);
|