commitizen 사용한 commit

백동우·2022년 12월 12일
1
post-thumbnail

Install

  • yarn : yarn add commitizen -D
  • npm : npm install commitizen --save-dev

git cz 명령어 입력

-> 먼 1% 아쉬운 느낌이 드는 커밋....

cz-customizable Install

  • yarn : yarn add cz-customizable -D
  • npm : npm install customizable --save-dev

경로 최상단에 cz-config.js 생성

module.exports = {
  types: [
    { value: '✨ Feat', name: '✨  새로운 기능, 페이지 추가' },
    {
      value: '🚚 Chore',
      name: '🚚 자잘한 수정',
    },
    {
      value: '💊 Fix',
      name: '💊 버그 수정',
    },
    {
      value: '🌞 Setting',
      name: '🌞 프로젝트 셋팅 및 package.json 수정',
    },
    { value: '📝 Docs', name: '📝 문서 관련' },
    {
      value: '💄 Style',
      name: '💄 스타일 수정',
    },
    {
      value: '🤖 Refactor',
      name: '🤖 코드 리펙토링',
    },
    {
      value: '✅ Test',
      name: '✅  테스트 관련',
    },
    {
      value: '📞 Remove',
      name: '📞  파일 삭제하는 작업만 수행한 경우',
    },
  ],
  allowCustomScopes: false,
  allowBreakingChanges: ['feat', 'fix'],
  skipQuestions: ['body'],
  subjectLimit: 100,
};

package.json수정

  "scripts": {
    ...
    "commit": "./node_modules/cz-customizable/standalone.js",
  },
  
 "config": {
 	...
    "cz-customizable": {
      "config": "cz-config.js"
    }
  }

명령어 입력 (scripts 파일에 적용해둔 명령어)

-> yarn commit

2개의 댓글

comment-user-thumbnail
2022년 12월 20일

야호 잘보고가여

답글 달기
comment-user-thumbnail
2023년 1월 10일

다시 커밋하세요

답글 달기