260703_01_FST: First Commit
This commit is contained in:
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# @kri/create-next-app
|
||||
|
||||
KRI 표준 Next.js 프로젝트 생성 CLI입니다.
|
||||
|
||||
## 사전 준비
|
||||
|
||||
사용자 npm 설정에서 `@kri` scope와 Gitea 토큰이 설정되어 있어야 합니다.
|
||||
|
||||
```ini
|
||||
@kri:registry=https://gitea.kric.com/api/packages/KRi/npm/
|
||||
//gitea.kric.com/api/packages/KRi/npm/:_authToken=${GITEA_NPM_TOKEN}
|
||||
```
|
||||
|
||||
## 개발
|
||||
|
||||
```powershell
|
||||
npm install
|
||||
npm run typecheck
|
||||
npm run build
|
||||
node .\dist\cli.js test-front --yes --skip-install
|
||||
```
|
||||
|
||||
## 사용
|
||||
|
||||
```powershell
|
||||
npx @kri/create-next-app survey-front
|
||||
```
|
||||
|
||||
질문 없이 기본값으로 생성:
|
||||
|
||||
```powershell
|
||||
npx @kri/create-next-app survey-front --yes
|
||||
```
|
||||
|
||||
주요 옵션은 `--help`로 확인합니다.
|
||||
|
||||
## 생성 과정
|
||||
|
||||
1. 표준 템플릿 복사
|
||||
2. Next.js 및 shadcn 호환 npm 의존성 설치
|
||||
3. `@kri/common@latest` 설치 후 exact 버전 기록
|
||||
4. KRI UI Registry 9개 항목 설치
|
||||
5. TypeScript 검사
|
||||
6. Next.js production build
|
||||
|
||||
UI Registry: `https://ui-registry.kric.com/r`
|
||||
|
||||
## 생성되는 환경 파일
|
||||
|
||||
`.env`, `.env.local`, `.env.development`, `.env.production`, `.env.example`을 생성합니다. `.env.local`과 `.env`는 기본적으로 Git에서 제외되며, `.env.development`와 `.env.production`은 Jenkins 빌드에 사용할 수 있도록 추적 가능합니다.
|
||||
|
||||
|
||||
## 호환성 정책
|
||||
|
||||
- `@kri/common`은 프로젝트 생성 시점의 최신 버전을 설치하고 exact 버전으로 기록합니다.
|
||||
- Next.js 생태계 호환성을 위해 생성 프로젝트의 TypeScript는 최신 5.x, ESLint는 최신 9.x를 사용합니다.
|
||||
- shadcn 기본 컴포넌트가 사용하는 `class-variance-authority`, `clsx`, `tailwind-merge`, `lucide-react`를 기본 의존성에 포함합니다.
|
||||
Reference in New Issue
Block a user