idxgen 후기

👊0👊·2021년 1월 23일
0

node에서 ui 라이브러리 만들때 일일히 index.js 만들기가 여간 귀찮은게 아니라서, 자동으로 index파일 만드는 걸 찾아봤다.
일단 idxgen은 별로인걸로

별로인 이유

설정이 너무 적다

현재 내가 작업하고 있는 폴더구조에 맞게 셋팅하고 싶은데 idxgen에선 설정하기가 힘들다.

{
  "mode": "manual",
  "exportMode": "single",
  "template": "export { $$ } from './$$';",
  "indexFile": "index.ts",
  "extensions": ["ts", "tsx"],
  "support": {
    "flow": true,
    "eslint": true,
    "prettier": true
  }
}

만약 디렉토리 구조가 아래와 같을 때

.
.
└── Components/
    ├── GoodsCard/
    │   ├── index.tsx
    │   ├── Lazy.tsx
    │   ├── GoodsCard.storeis.tsx
    │   └── GoodsCard.test.tsx
    └── Header/
        ├── index.tsx
        ├── Tab.tsx
        ├── Body.tsx
        ├── Header.stories.tsx
        └── Header.test.tsx

다음과 같이 변경한다.

.
└── Components/
    ├── GoodsCard/
    │   ├── index.ts
    │   ├── index.tsx
    │   ├── Lazy.tsx
    │   ├── GoodsCard.storeis.tsx
    │   └── GoodsCard.test.tsx
    └── Header/
        ├── index.ts
        ├── index.tsx
        ├── Tab.tsx
        ├── Body.tsx
        ├── Header.stories.tsx
        └── Header.test.tsx

내가 원하는 건 이건데

.
└── Components/
    ├── GoodsCard/
    │   ├── index.tsx
    │   ├── Lazy.tsx
    │   ├── GoodsCard.storeis.tsx
    │   └── GoodsCard.test.tsx
    ├── Header/
    │   ├── index.tsx
    │   ├── Tab.tsx
    │   ├── Body.tsx
    │   ├── Header.stories.tsx
    │   └── Header.test.tsx
    └── index.ts
profile
ㅎㅎ

0개의 댓글