atomsystem 0.1.36 → 0.1.37

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.
Files changed (2) hide show
  1. package/cli/init.js +17 -9
  2. package/package.json +1 -1
package/cli/init.js CHANGED
@@ -17,6 +17,7 @@ const __dirname = path.dirname(__filename);
17
17
  const packageRoot = path.join(__dirname, "..");
18
18
  const tokenFile = path.join(packageRoot, "tokens", "tokens.json");
19
19
  const buildFile = path.join(packageRoot, "build", "build-tokens.js");
20
+ const textCssFile = path.join(packageRoot, "css", "text.css");
20
21
 
21
22
  // 프로젝트 루트 경로 (사용자가 실행한 곳)
22
23
  const projectRoot = process.cwd();
@@ -24,6 +25,16 @@ const targetTokenDir = path.join(projectRoot, "tokens");
24
25
  const targetTokenFile = path.join(targetTokenDir, "tokens.json");
25
26
  const targetBuildDir = path.join(projectRoot, "build");
26
27
  const targetBuildFile = path.join(targetBuildDir, "build-tokens.js");
28
+ const targetCssDir = path.join(projectRoot, "css");
29
+ const targetTextCssFile = path.join(targetCssDir, "text.css");
30
+
31
+ // 파일 복사 헬퍼: 대상 디렉토리 생성 → 파일 복사 → 로그 출력
32
+ function copyTo(src, dest, label) {
33
+ const dir = path.dirname(dest);
34
+ if (!fs.existsSync(dir)) mkdirSync(dir, { recursive: true });
35
+ copyFileSync(src, dest);
36
+ console.log(`✅ Copied: ${label} -> ${dest}`);
37
+ }
27
38
 
28
39
  // 사용자 프로젝트에 package.json이 존재하는지 먼저 확인 (안전장치)
29
40
  const packageJsonPath = path.join(projectRoot, "package.json");
@@ -118,7 +129,8 @@ export default function RootLayout({ children }: { children: React.ReactNode })
118
129
  {
119
130
  path: path.join(appDir, "globals.css"),
120
131
  content: `@import "tailwindcss";
121
- @import "../build/css/_variables.css";`,
132
+ @import "../build/css/_variables.css";
133
+ @import "../css/text.css";`,
122
134
  },
123
135
  {
124
136
  path: path.join(appDir, "page.tsx"),
@@ -252,14 +264,10 @@ export default config;`,
252
264
  console.log("🚀 Installation skipped.");
253
265
  }
254
266
 
255
- // ✅ 토큰 파일과 빌드 파일 복사 (Next.js 설치 여부와 관계없이 실행)
256
- if (!fs.existsSync(targetTokenDir)) mkdirSync(targetTokenDir, { recursive: true });
257
- copyFileSync(tokenFile, targetTokenFile);
258
- console.log(`✅ Copied: tokens/tokens.json -> ${targetTokenFile}`);
259
-
260
- if (!fs.existsSync(targetBuildDir)) mkdirSync(targetBuildDir, { recursive: true });
261
- copyFileSync(buildFile, targetBuildFile);
262
- console.log(`✅ Copied: build-tokens.js -> ${targetBuildFile}`);
267
+ // ✅ 필수 파일 복사 (Next.js 설치 여부와 관계없이 실행)
268
+ copyTo(tokenFile, targetTokenFile, "tokens/tokens.json");
269
+ copyTo(buildFile, targetBuildFile, "build/build-tokens.js");
270
+ copyTo(textCssFile, targetTextCssFile, "css/text.css");
263
271
 
264
272
  console.log("🚀 Token setup complete!");
265
273
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atomsystem",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "type": "module",
5
5
  "homepage": "https://system.atomground.com",
6
6
  "bin": {