@mandujs/cli 0.9.45 → 0.9.46

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mandujs/cli",
3
- "version": "0.9.45",
3
+ "version": "0.9.46",
4
4
  "description": "Agent-Native Fullstack Framework - 에이전트가 코딩해도 아키텍처가 무너지지 않는 개발 OS",
5
5
  "type": "module",
6
6
  "main": "./src/main.ts",
@@ -44,7 +44,27 @@ export async function build(options: BuildOptions = {}): Promise<boolean> {
44
44
  return false;
45
45
  }
46
46
 
47
- // 2. Hydration이 필요한 라우트 확인
47
+ // 2. Tailwind CSS 빌드 (Island 여부와 무관하게 먼저 실행)
48
+ const hasTailwind = await isTailwindProject(cwd);
49
+ const resolvedMinify = options.minify ?? buildConfig.minify ?? true;
50
+
51
+ if (hasTailwind) {
52
+ console.log(`\n🎨 Tailwind CSS v4 빌드 중...`);
53
+ const cssResult = await buildCSS({
54
+ rootDir: cwd,
55
+ minify: resolvedMinify,
56
+ });
57
+
58
+ if (!cssResult.success) {
59
+ console.error(`\n❌ CSS 빌드 실패: ${cssResult.error}`);
60
+ return false;
61
+ }
62
+
63
+ console.log(` ✅ CSS 빌드 완료 (${cssResult.buildTime?.toFixed(0)}ms)`);
64
+ console.log(` 출력: ${cssResult.outputPath}`);
65
+ }
66
+
67
+ // 3. Hydration이 필요한 라우트 확인
48
68
  const hydratedRoutes = manifest.routes.filter(
49
69
  (route) =>
50
70
  route.kind === "page" &&
@@ -55,6 +75,12 @@ export async function build(options: BuildOptions = {}): Promise<boolean> {
55
75
  if (hydratedRoutes.length === 0) {
56
76
  console.log("\n📭 Hydration이 필요한 라우트가 없습니다.");
57
77
  console.log(" (clientModule이 없거나 hydration.strategy: none)");
78
+
79
+ // CSS만 빌드된 경우도 성공으로 처리
80
+ if (hasTailwind) {
81
+ console.log(`\n✅ CSS 빌드 완료`);
82
+ console.log(` CSS: .mandu/client/globals.css`);
83
+ }
58
84
  return true;
59
85
  }
60
86
 
@@ -64,24 +90,6 @@ export async function build(options: BuildOptions = {}): Promise<boolean> {
64
90
  console.log(` - ${route.id} (${hydration.strategy}, ${hydration.priority || "visible"})`);
65
91
  }
66
92
 
67
- // 3. Tailwind CSS 빌드 (감지 시에만)
68
- const hasTailwind = await isTailwindProject(cwd);
69
- if (hasTailwind) {
70
- console.log(`\n🎨 Tailwind CSS v4 빌드 중...`);
71
- const cssResult = await buildCSS({
72
- rootDir: cwd,
73
- minify: options.minify ?? true,
74
- });
75
-
76
- if (!cssResult.success) {
77
- console.error(`\n❌ CSS 빌드 실패: ${cssResult.error}`);
78
- return false;
79
- }
80
-
81
- console.log(` ✅ CSS 빌드 완료 (${cssResult.buildTime?.toFixed(0)}ms)`);
82
- console.log(` 출력: ${cssResult.outputPath}`);
83
- }
84
-
85
93
  // 4. 번들 빌드
86
94
  const startTime = performance.now();
87
95
  const resolvedBuildOptions: BuildOptions = {