@mulanjs/mulanjs 1.0.1-dev.20260310071649 ā 1.0.1-dev.20260314141520
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/package.json
CHANGED
|
Binary file
|
package/src/cli/index.js
CHANGED
|
@@ -492,16 +492,38 @@ if (app) {
|
|
|
492
492
|
console.log(` 2. npm install`);
|
|
493
493
|
console.log(` 3. npm run dev`);
|
|
494
494
|
|
|
495
|
-
// Auto-install
|
|
495
|
+
// Auto-install extension
|
|
496
496
|
try {
|
|
497
|
-
const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.0.
|
|
497
|
+
const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.1.0.vsix');
|
|
498
498
|
if (fs.existsSync(vsixPath)) {
|
|
499
|
-
console.log('\nš¦ Installing MulanJS
|
|
500
|
-
|
|
501
|
-
|
|
499
|
+
console.log('\nš¦ Installing MulanJS Extension...');
|
|
500
|
+
|
|
501
|
+
let installed = false;
|
|
502
|
+
|
|
503
|
+
// Try Antigravity first then VS Code
|
|
504
|
+
const commands = [
|
|
505
|
+
{ cmd: 'antigravity', name: 'Antigravity' },
|
|
506
|
+
{ cmd: 'code', name: 'VS Code' }
|
|
507
|
+
];
|
|
508
|
+
|
|
509
|
+
for (const { cmd, name } of commands) {
|
|
510
|
+
try {
|
|
511
|
+
execSync(`${cmd} --version`, { stdio: 'ignore' });
|
|
512
|
+
console.log(`š Installing extension via ${name} CLI...`);
|
|
513
|
+
shell(`${cmd} --install-extension "${vsixPath}" --force`);
|
|
514
|
+
console.log(`ā
Extension installed successfully in ${name}!`);
|
|
515
|
+
installed = true;
|
|
516
|
+
} catch (e) {
|
|
517
|
+
// Command not found, continue to next
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
if (!installed) {
|
|
522
|
+
console.warn('ā ļø Could not auto-install extension (Neither Antigravity nor VS Code CLI found).');
|
|
523
|
+
}
|
|
502
524
|
}
|
|
503
525
|
} catch (e) {
|
|
504
|
-
console.warn('ā ļø
|
|
526
|
+
console.warn('ā ļø Extension installation process failed.');
|
|
505
527
|
}
|
|
506
528
|
|
|
507
529
|
|
|
@@ -603,24 +625,40 @@ program
|
|
|
603
625
|
.description('Install the MulanJS VS Code Extension for icons and syntax highlighting')
|
|
604
626
|
.action(async () => {
|
|
605
627
|
await printBanner();
|
|
606
|
-
console.log('š¦ Locating MulanJS
|
|
628
|
+
console.log('š¦ Locating MulanJS Extension...');
|
|
607
629
|
try {
|
|
608
|
-
|
|
609
|
-
const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.0.1.vsix');
|
|
630
|
+
const vsixPath = path.join(__dirname, 'extensions', 'mulanjs-vscode-1.1.0.vsix');
|
|
610
631
|
|
|
611
632
|
if (!fs.existsSync(vsixPath)) {
|
|
612
633
|
console.error('ā Error: Extension file not found at:', vsixPath);
|
|
613
|
-
console.log('Ensure you have a full installation of the mulanjs package.');
|
|
614
634
|
return;
|
|
615
635
|
}
|
|
616
636
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
637
|
+
let installed = false;
|
|
638
|
+
const commands = [
|
|
639
|
+
{ cmd: 'antigravity', name: 'Antigravity' },
|
|
640
|
+
{ cmd: 'code', name: 'VS Code' }
|
|
641
|
+
];
|
|
642
|
+
|
|
643
|
+
for (const { cmd, name } of commands) {
|
|
644
|
+
try {
|
|
645
|
+
execSync(`${cmd} --version`, { stdio: 'ignore' });
|
|
646
|
+
console.log(`š Installing extension via ${name} CLI...`);
|
|
647
|
+
shell(`${cmd} --install-extension "${vsixPath}" --force`);
|
|
648
|
+
console.log(`ā
Success! Restart ${name} to see your new .mujs icons.`);
|
|
649
|
+
installed = true;
|
|
650
|
+
} catch (e) {
|
|
651
|
+
// Command not found
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
if (!installed) {
|
|
656
|
+
console.error('\nā Failed to install extension.');
|
|
657
|
+
console.log('Make sure "antigravity" or "code" (VS Code CLI) is in your PATH.');
|
|
658
|
+
console.log('Manual Install: You can also drag the .vsix file from your node_modules/mulanjs/src/cli/extensions into your editor.');
|
|
659
|
+
}
|
|
620
660
|
} catch (e) {
|
|
621
661
|
console.error('\nā Failed to install extension.');
|
|
622
|
-
console.log('Make sure "code" (VS Code CLI) is in your PATH.');
|
|
623
|
-
console.log('Manual Install: You can also drag the .vsix file from your node_modules/mulanjs/src/cli/extensions into VS Code.');
|
|
624
662
|
}
|
|
625
663
|
});
|
|
626
664
|
|