bluedither 1.0.11 → 1.0.12
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 +23 -3
- package/package.json +1 -1
package/cli/commands/install.js
CHANGED
|
@@ -45,12 +45,12 @@ export default async function install(args) {
|
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// Check if first arg is a registry reference (@designer/theme-name)
|
|
48
|
+
// Check if first arg is a registry reference (@designer/theme-name or @theme-name)
|
|
49
49
|
const firstArg = args[0] || '.';
|
|
50
|
-
const registryMatch = firstArg.match(/^@([^/]+)\/(.+)$/);
|
|
50
|
+
const registryMatch = firstArg.match(/^@([^/]+)\/(.+)$/) || firstArg.match(/^@([^/]+)$/);
|
|
51
51
|
|
|
52
52
|
if (registryMatch) {
|
|
53
|
-
const slug = registryMatch[2];
|
|
53
|
+
const slug = registryMatch[2] || registryMatch[1];
|
|
54
54
|
const targetDir = resolve(args[1] || '.');
|
|
55
55
|
await installFromRegistry(slug, targetDir);
|
|
56
56
|
return;
|
|
@@ -198,6 +198,20 @@ async function installFromRegistry(slug, targetDir) {
|
|
|
198
198
|
|
|
199
199
|
console.log(` Extracted ${extracted} files to ${bdDir}`);
|
|
200
200
|
|
|
201
|
+
// Copy tuner files from the npm package (not in the theme ZIP)
|
|
202
|
+
const tunerFiles = [
|
|
203
|
+
['dist/bluedither-tuner.js', 'bluedither-tuner.js'],
|
|
204
|
+
['fine-tuner/tuner.css', 'bluedither-tuner.css'],
|
|
205
|
+
['fine-tuner/inject.js', 'bluedither-tuner-inject.js'],
|
|
206
|
+
];
|
|
207
|
+
for (const [src, dest] of tunerFiles) {
|
|
208
|
+
const srcPath = resolve(BLUEDITHER_ROOT, src);
|
|
209
|
+
const destPath = resolve(bdDir, dest);
|
|
210
|
+
if (existsSync(srcPath)) {
|
|
211
|
+
copyFileSync(srcPath, destPath);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
201
215
|
// Detect framework and create Claude Code command
|
|
202
216
|
const { framework, typescript } = detectFramework(targetDir);
|
|
203
217
|
console.log(` Detected framework: ${framework}${typescript ? ' + TypeScript' : ''}`);
|
|
@@ -223,5 +237,11 @@ $ARGUMENTS
|
|
|
223
237
|
|
|
224
238
|
To apply the theme, use Claude Code:
|
|
225
239
|
/apply-theme [description of your site]
|
|
240
|
+
|
|
241
|
+
To customize visually, add this to your HTML:
|
|
242
|
+
<script src="./bluedither/bluedither-tuner-inject.js"><\/script>
|
|
243
|
+
|
|
244
|
+
For auto-saving, run in a separate terminal:
|
|
245
|
+
npx bluedither tune --save-only
|
|
226
246
|
`);
|
|
227
247
|
}
|