@mulanjs/mulanjs 1.0.1-dev.20260220132855 → 1.0.1-dev.20260220134357
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 +2 -2
- package/src/cli/index.js +21 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mulanjs/mulanjs",
|
|
3
|
-
"version": "1.0.1-dev.
|
|
3
|
+
"version": "1.0.1-dev.20260220134357",
|
|
4
4
|
"description": "A powerful, secure, and enterprise-grade JavaScript framework.",
|
|
5
5
|
"main": "dist/mulan.js",
|
|
6
6
|
"module": "dist/mulan.esm.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"webpack-cli": "6.0.1",
|
|
64
64
|
"webpack-dev-server": "5.2.0",
|
|
65
65
|
"ts-loader": "9.5.4",
|
|
66
|
-
"typescript": "5.
|
|
66
|
+
"typescript": "5.3.3",
|
|
67
67
|
"source-map": "0.7.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
package/src/cli/index.js
CHANGED
|
@@ -46,14 +46,20 @@ const LOGO_SVG = `<svg width="50" height="50" viewBox="0 0 120 120" fill="none"
|
|
|
46
46
|
<circle cx="75" cy="75" r="2" fill="#FF9800"/>
|
|
47
47
|
</svg>`;
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
const delay = ms => new Promise(res => setTimeout(res, ms));
|
|
50
|
+
|
|
51
|
+
async function printBanner() {
|
|
52
|
+
const lines = [
|
|
53
|
+
'\x1b[35mMULANJS\x1b[0m',
|
|
54
|
+
'\x1b[33m⚡ THE WORLD\'S MOST POWERFUL ASTR-Q FRAMEWORK ⚡\x1b[0m',
|
|
55
|
+
'\x1b[36mIron Fortress Security: ACTIVE\x1b[0m',
|
|
56
|
+
'-'.repeat(50)
|
|
53
57
|
];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
|
|
59
|
+
for (const line of lines) {
|
|
60
|
+
console.log(line);
|
|
61
|
+
await delay(100);
|
|
62
|
+
}
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
function askQuestion(query) {
|
|
@@ -73,7 +79,7 @@ program
|
|
|
73
79
|
.option('--ts', 'Initialize as TypeScript project')
|
|
74
80
|
.option('--js', 'Initialize as JavaScript project')
|
|
75
81
|
.action(async (projectName, options) => {
|
|
76
|
-
printBanner();
|
|
82
|
+
await printBanner();
|
|
77
83
|
console.log(`\n🚀 Unleashing MulanJS Power: Preparing ${projectName}...\n`);
|
|
78
84
|
|
|
79
85
|
const projectPath = path.resolve(process.cwd(), projectName);
|
|
@@ -153,7 +159,7 @@ program
|
|
|
153
159
|
};
|
|
154
160
|
|
|
155
161
|
if (isTS) {
|
|
156
|
-
packageJson.devDependencies["typescript"] = "^5.
|
|
162
|
+
packageJson.devDependencies["typescript"] = "^5.3.3";
|
|
157
163
|
packageJson.devDependencies["ts-loader"] = "^9.5.4";
|
|
158
164
|
}
|
|
159
165
|
|
|
@@ -526,6 +532,7 @@ program
|
|
|
526
532
|
.command('dev [args...]')
|
|
527
533
|
.description('Start the Mulan Development Server')
|
|
528
534
|
.action(async () => {
|
|
535
|
+
await printBanner();
|
|
529
536
|
try {
|
|
530
537
|
const port = await findAvailablePort(1016);
|
|
531
538
|
console.log(`🚀 Starting Mulan Power Server on port ${port}...`);
|
|
@@ -544,7 +551,8 @@ program
|
|
|
544
551
|
program
|
|
545
552
|
.command('build [args...]')
|
|
546
553
|
.description('Build for production')
|
|
547
|
-
.action(() => {
|
|
554
|
+
.action(async () => {
|
|
555
|
+
await printBanner();
|
|
548
556
|
try {
|
|
549
557
|
shell('npx webpack --mode production');
|
|
550
558
|
} catch (e) {
|
|
@@ -557,6 +565,7 @@ program
|
|
|
557
565
|
.alias('g')
|
|
558
566
|
.description('Generate a new MulanJS resource')
|
|
559
567
|
.action(async (type, name) => {
|
|
568
|
+
await printBanner();
|
|
560
569
|
if (type === 'component') {
|
|
561
570
|
const compName = name.charAt(0).toUpperCase() + name.slice(1);
|
|
562
571
|
console.log(`⚡ Generating Component: ${compName}...`);
|
|
@@ -589,6 +598,7 @@ program
|
|
|
589
598
|
.command('install-extension')
|
|
590
599
|
.description('Install the MulanJS VS Code Extension for icons and syntax highlighting')
|
|
591
600
|
.action(async () => {
|
|
601
|
+
await printBanner();
|
|
592
602
|
console.log('📦 Locating MulanJS VS Code Extension...');
|
|
593
603
|
try {
|
|
594
604
|
// Find where mulanjs is installed. If run via npx, __dirname is the cli folder.
|
|
@@ -614,6 +624,7 @@ program
|
|
|
614
624
|
.command('static')
|
|
615
625
|
.description('Generate static HTML (SSG) for SEO and performance')
|
|
616
626
|
.action(async () => {
|
|
627
|
+
await printBanner();
|
|
617
628
|
const { generateStaticSite } = require('./static-generator');
|
|
618
629
|
await generateStaticSite();
|
|
619
630
|
});
|