npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cz-gitmoji-adapter

v2.0.0

Published

Commitizen adapter using gitmojis.

Downloads

420

Readme

cz-gitmoji-adapter

Commitizen adapter formatting commit messages using gitmojis.

cz-gitmoji-adapter allows you to easily use gitmojis in your commits using [commitizen].

? Select the type of change you are committing: (Use arrow keys)
❯ feature   🌟  A new feature
  fix       🐞  A bug fix
  docs      📚  Documentation change
  refactor  🎨  A code refactoring change
  chore     🔩  A chore change

Install

Globally

npm install --global cz-gitmoji-adapter

# set as default adapter for your projects
echo '{ "path": "cz-gitmoji-adapter" }' > ~/.czrc

Locally

npm install --save-dev cz-gitmoji-adapter

Add this to your package.json:

"config": {
  "commitizen": {
    "path": "cz-gitmoji-adapter"
  }
}

ℹ️ pnpm requires you to specify node_modules/cz-gitmoji-adapter.

Usage

$ git cz

Customization

By default cz-gitmoji-adapter comes ready to run out of the box. Uses may vary, so there are a few configuration options to allow fine tuning for project needs.

How to

Configuring cz-gitmoji-adapter can be handled in the users home directory (~/.czrc) for changes to impact all projects or on a per project basis (package.json). Simply add the config property as shown below to the existing object in either of the locations with your settings for override.

{
  "config": {
    "cz-gitmoji-adapter": {}
  }
}

Configuration Options

Types

By default cz-gitmoji-adapter comes preconfigured with the Gitmoji types.

An [Inquirer.js] choices array:

{
  "config": {
    "cz-gitmoji-adapter": {
      "types": [
        {
          "emoji": "🌟",
          "code": ":star2:",
          "description": "A new feature",
          "name": "feature"
        }
      ]
    }
  }
}

Scopes

An [Inquirer.js] choices array:

{
  "config": {
    "cz-gitmoji-adapter": {
      "scopes": ["home", "accounts", "ci"]
    }
  }
}

Symbol

A boolean value that allows for an using a unicode value rather than the default of Gitmoji markup in a commit message. The default for symbol is false.

{
  "config": {
    "cz-gitmoji-adapter": {
      "symbol": true
    }
  }
}

Skip Questions

An array of questions you want to skip:

{
  "config": {
    "cz-gitmoji-adapter": {
      "skipQuestions": ["scope", "issues"]
    }
  }
}

You can skip the following questions: scope, body, issues, and breaking. The type and subject questions are mandatory.

Customize Questions

An object that contains overrides of the original questions:

{
  "config": {
    "cz-gitmoji-adapter": {
      "questions": {
        "body": "This will be displayed instead of original text"
      }
    }
  }
}

Customize the subject max length

The maximum length you want your subject has

{
  "config": {
    "cz-gitmoji-adapter": {
      "subjectMaxLength": 200
    }
  }
}

Commitlint

Commitlint can be set to work with this package with the following configuration:

commitlint.config.ts

import {
    RuleConfigCondition,
    RuleConfigSeverity,
    TargetCaseType,
} from '@commitlint/types';

export default {
    extends: ['gitmoji'],
    parserPreset: '@gitmoji/parser-opts',
    rules: {
        'body-leading-blank': [RuleConfigSeverity.Warning, 'always'] as const,
        'body-max-line-length': [RuleConfigSeverity.Error, 'always', 100] as const,
        'footer-leading-blank': [RuleConfigSeverity.Warning, 'always'] as const,
        'footer-max-line-length': [
            RuleConfigSeverity.Error,
            'always',
            100,
        ] as const,
        'header-max-length': [RuleConfigSeverity.Error, 'always', 100] as const,
        'header-trim': [RuleConfigSeverity.Error, 'always'] as const,
        'subject-case': [
            RuleConfigSeverity.Error,
            'never',
            ['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
        ] as [RuleConfigSeverity, RuleConfigCondition, TargetCaseType[]],
        'subject-empty': [RuleConfigSeverity.Error, 'never'] as const,
        'subject-full-stop': [RuleConfigSeverity.Error, 'never', '.'] as const,
        'type-case': [RuleConfigSeverity.Error, 'always', 'lower-case'] as const,
        'type-empty': [RuleConfigSeverity.Error, 'never'] as const,
        'type-enum': [
            RuleConfigSeverity.Error,
            'always',
            [
                'style',
                'perf',
                'prune',
                'fix',
                'quickfix',
                'feature',
                'docs',
                'deploy',
                'ui',
                'init',
                'test',
                'security',
                'osx',
                'linux',
                'windows',
                'android',
                'ios',
                'release',
                'lint',
                'wip',
                'fix-ci',
                'downgrade',
                'upgrade',
                'pushpin',
                'ci',
                'analytics',
                'refactoring',
                'docker',
                'dep-add',
                'dep-rm',
                'config',
                'i18n',
                'typo',
                'poo',
                'revert',
                'merge',
                'dep-up',
                'compat',
                'mv',
                'license',
                'breaking',
                'assets',
                'review',
                'access',
                'docs-code',
                'beer',
                'texts',
                'db',
                'log-add',
                'log-rm',
                'contrib-add',
                'ux',
                'arch',
                'iphone',
                'clown-face',
                'egg',
                'see-no-evil',
                'camera-flash',
                'experiment',
                'seo',
                'k8s',
                'types',
                'seed',
                'flags',
                'animation',
                'wastebasket',
                'passport-control',
                'adhesive-bandage',
                'monocle-face',
                'coffin',
                'test-tube',
                'necktie',
                'stethoscope',
                'bricks',
                'technologist'
            ],
        ] as [RuleConfigSeverity, RuleConfigCondition, string[]],
    }
};