atomsystem 0.1.12 → 0.1.13

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/add.js +4 -2
  2. package/package.json +1 -1
package/cli/add.js CHANGED
@@ -6,7 +6,9 @@ import path from "path";
6
6
  import { copyFileSync } from "fs";
7
7
  import { fileURLToPath } from "url";
8
8
 
9
- const __dirname = fileURLToPath(new URL(".", import.meta.url));
9
+ // 현재 실행중인 CLI 파일의 디렉토리 찾기
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = path.dirname(__filename);
10
12
 
11
13
  // 컴포넌트 템플릿이 위치한 디렉토리
12
14
  const templateDir = path.join(__dirname, "templates");
@@ -26,7 +28,7 @@ const args = process.argv.slice(2); // 'npx atomsystem-add Button -> [Button]'
26
28
  const component = args[0] || "all"; // '사용자가 입력하지 않으면 기본적으로 'all''
27
29
 
28
30
  function addComponent(comp) {
29
- const componentPath = path.join(templateDir, `${comp}/${comp}.tsx`);
31
+ const componentPath = path.join(templateDir, comp, `${comp}.tsx`);
30
32
  const targetDir = path.join(process.cwd(), "app", "components", comp);
31
33
  const targetPath = path.join(targetDir, `${comp}.tsx`);
32
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atomsystem",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "atomsystem-init": "cli/init.js",