-
Notifications
You must be signed in to change notification settings - Fork 2
[code-style-cli] 패키지 설치 및 설정 파일 생성 CLI 도구 추가 #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 출력 메시지에 이모지 추가 - copyFrom 파일 존재 여부 체크 추가
- prettier: .prettierrc - stylelint: stylelint.config.mjs - oxlint: .oxlintrc.json - biome: biome.json
✅ Changeset detectedLatest commit: 8f6112c
If no version change is needed, please add The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
|
|
신규 패키지 첫 배포는 로컬에서 직접해야 한다고 말씀해주셨던 것 같아서, changeset은 추가하지 않았습니다! |
packages/code-style-cli/cli.js
Outdated
|
|
||
| if (packagesToInstall.length > 0) { | ||
| console.log('\n📥 패키지 설치 중...') | ||
| execSync(`${INSTALL_CMD[pm]} ${packagesToInstall.join(' ')}`, {stdio: 'inherit'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요런거 설치 실패시 try catch 로 감싸주세용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다! 반영했습니당: 6e7dcf3
packages/code-style-cli/configs.js
Outdated
|
|
||
| const BIOME_CONTENT = JSON.stringify( | ||
| { | ||
| $schema: 'https://biomejs.dev/schemas/2.2.6/schema.json', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요고 biome 버전이랑 연동은 안되나여? 설치한거랑 스키마 버전이 다른가
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 기존 코드에서는 실제 설치된 버전이랑 스키마 버전이 다를 수가 있겠군요.
패키지 설치 후 package.json의 biome 버전을 읽어 스키마 URL을 동적으로 생성하도록 수정했습니다! e5b30f9
|
로컬 publish 한번 해드릴까요? |
packages/code-style-cli/configs.js
Outdated
| export const INSTALL_CMD = { | ||
| npm: 'npm install -D', | ||
| yarn: 'yarn add -D', | ||
| pnpm: 'pnpm add -D', | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
패키지 매니저 관련 내용이 흩어져 있어서 조금 보기 힘든 느낌쓰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다!
INSTALL_CMD와 lockfile 감지 로직을 PACKAGE_MANAGERS 객체로 통합해서 관리하도록 수정했습니다 : 07c88ec
|
설치할 패키지 설치시 설치가 되어 있으면 어떻게 되나여? 설치 후 업데이트? 아니면 abort? 규칙덮어쓰나용? |
설치된 @biomejs/biome 버전에 맞춰 biome.json의 $schema URL을 자동으로 설정합니다.
PACKAGE_MANAGERS 객체로 lock 파일과 install 명령어를 한 곳에서 관리합니다.
기존에는 설치 여부와 관계없이 그냥 재설치되고, 설정 파일이 존재하면 설정 파일 생성을 스킵했습니다. (덮어쓰기 X) 조금 더 고민해본 결과,
위와 같이 수정하였습니다! 4e6d55e |
|
@pja9362 님, changeset 배포도 될거예여 제가 연동함 (아마도) |
|
@yceffort-naver 님 감사합니다! |
|
changeset 만 추가하시죠! |
Added CLI tool for installing and configuring the code-style-cli package.
@yceffort-naver 님, 추가했습니다! 감사합니다 🙇♀️ |
yceffort-naver
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다!




Related Issue
Describe your changes
변경 사항
@naverpay/code-style-cli패키지를 추가합니다.pnpm v10+에서 postinstall 스크립트가 기본적으로 실행되지 않는 문제에 대응하여, 패키지 설치와 설정 파일 생성을 한 번에 처리하는 CLI 도구입니다.
기능
지원 패키지
.prettierrcstylelint.config.mjs.markdownlint.jsonc.editorconfig.oxlintrc.jsonbiome.json.oxfmtrc.json동작흐름
사용 예시
기타
prompt 라이브러리 선택