1.0.3 β€’ Published 7 months ago

commitsmile v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

CommitSmileBanner

output

What you get:

  • 🌈 Beautiful Commits
  • πŸ“ Standardized commit messages
  • 🎯 Simplified commit process

About package:

  • πŸš€ Install & Use
  • βš™οΈ Easy in Configuring
  • πŸ”§ High Customizable (Prompts, Formatters)
  • πŸ“¦ Support Monorepo
  • πŸ“– TSDocs (Internal documentation)
  • ♻️ Minified & Compressed
  • βœ… Support JS/TS & CJS/ESM

πŸ“œ List of Contest

Install

NPM

npm install -D commitsmile

PNPM

pnpm add -D commitsmile

Yarn

yarn add -D commitsmile

How to start

πŸ‘‹Hello! Glad to see you! There is order task to setup:

CommandDescription
pnpm i -D commitsmileInstall it at repo
pnpm commitsmile initInit and configure (Optional)
pnpm commitsmileUse! :D

Commands

CommandDescription
(default)Commit Handler (CLI APP)
initInit config file (CLI APP)

To get more information about commands, use --help

Config

Location / Naming

To find config we use c12 and our system.

Dedicated File

In Default execute app is looking for files names match /commitsmile.*\.(js|ts|mjs|cjs|mts|json|jsonc|json5|yaml|yml|toml)/iu

  • Name: commitsmile (letters can be uppercase or lowercase or mixed)
  • pre ext (optional)
  • Ext: js|ts|mjs|cjs|mts|json|jsonc|json5|yaml|yml|toml

examples:

  • commitsmile.discord.ts
  • coMMitSmile.json

Supports to:

βœ… Supports too
.config/
.rc

package.json

With commitsmile property.

Default Config & Types

Package export defaultConfig which can be configured and deep merge your config!

import { defaultConfig } from "commitsmile";

export default defaultConfig({
	/* There config for defaultConfig */
}).deepMerge({
	/* There your config which will be merged with default config*/
});

More info in internal Documentation (Code)

Explaination

Formatters

There you can make your own formatters.

Stage namedescription
formatFormat formatted stages output (Final format of commit)
typeFormat of type
scopesFormat of scopes
isBreakingFormat of isBreaking
titleFormat of title

Prompts

Part of Config responsible for Commit Stages.

Stage nametype of promptSpecial properties
typemultiselect
scopesmultiselectworkspaces - Show found workspaces in monorepo
isBreakingconfirm
titletext
descriptionselectalways - Always select that in select menu

Every Step is Optional and can be skipped. To do it just use value false or undefined / void 0

finalCommands

Commands which will be executed at the end (In key order).

example:

{
  gitAdd: "git add .",
  commit: (results) => `git commit -m '${results.format()}' ${results.commitDescription ? `-m "${results.commitDescription}"` : ''}`,
  gitPush:"git push"
}

Short hands

Every shorthand it's provided by our parser.

AtDescriptionFromTo
Config.prompts.stageIf value is just a stringtype:"What type of changes"type:{message:"What type of changes"}
Config.prompts.stage.optionsIf option is just a string["Option 1"][{value:"Option 1"}] and continue below logic
Config.prompts.stage.optionsIf option has a value but not a label[{value:"Option 1"}][{value:"Option 1", label:"Option 1"}]
Config.prompts.stage.optionsIf option has a label but not a value[{label:"Option 1"}][{value:"Option 1", label:"Option 1"}]

Questions and Answers

Can i Remove emojis? (Yes)

Yes, you can do this,this way:

Removing All

If you want to remove them totally in CLI view commit

{
	emoji: false;
}

Removing From Label

If you want to remove them in CLI view but stay in commit

{
	emoji: {
		label: false;
	}
}

Removing From Value

If you want to remove them in commit but stay in CLI view

{
	emoji: {
		value: false;
	}
}
1.0.2

7 months ago

1.0.3

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.3.9

2 years ago

0.4.0

1 year ago

0.3.10

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago