conventional-changelog-gitmoji-config-types

1.4.3 • Public • Published

conventional-changelog-gitmoji-config

NPM version NPM downloads

sharable conventional changelog configuration for gitmoji style commit

Configuration File

conventional-changelog-gitmoji-config uses cosmiconfig to find and load your configuration object. Starting from the current working directory, it looks for the following possible sources:

  • a changelog property in package.json
  • a .changelogrc file
  • a changelog.config.js file exporting a JS object

The .changelogrc file (without extension) can be in JSON or YAML format. You can add a filename extension to help your text editor provide syntax checking and highlighting:

  • .changelogrc.json
  • .changelogrc.yaml / .changelogrc.yml
  • .changelogrc.js

The configuration object has the following signature:

interface ChangelogConfig {
  /**
   * map the scope to display name
   *
   * for example
   * {
   *     'config': 'commitlint-gitmoji-config'
   * }
   * will map all config 'scope' to 'commitlint-gitmoji-config' in the changelog
   * @default { }
   */
  scopeDisplayName?: Record<string, string>;
  /**
   * display types
   * @default undefined
   */
  displayTypes?: string[];
  /**
   * whether to include emoji in title
   * @default true
   */
  withEmoji?: boolean;
  /**
   * title language
   * @default en-US
   */
  titleLanguage?: 'en-US' | 'zh-CN';
  /**
   * whether to show author
   * @default false
   */
  showAuthor?: boolean;
  /**
   * 自定义type样式
   * feat: {
        emoji: '✨',
        'en-US': 'Features',
        'zh-CN': '新特性',
      },
   */
  typeMap?: Record<Exclude<CommitTypes, 'wip'>, TypeNameMap>
}

License

MIT ® Arvin Xu

Package Sidebar

Install

npm i conventional-changelog-gitmoji-config-types

Weekly Downloads

1

Version

1.4.3

License

MIT

Unpacked Size

20.6 kB

Total Files

19

Last publish

Collaborators

  • chinasun