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

create-branches-cli

v0.3.1

Published

The utility for creating branches according to a certain template, moving in steps

Downloads

42

Readme

Installation

npm i create-branches-cli

Usage example

  1. You need to add the script to package.json. In the screenshot, the desired screen is cb (short for create branches)

img.png

  • You can also immediately enter the command npx create-branches-cli into the terminal
  1. You need to create a cbconfig.json in the root of the project
EXAMPLE:
{
  "branch_name_template": "<task_type>/<project_name>-<task_id>-<task_name>",
  "project_names": "CHATPOINT",
  "task_types": ["feature", "bugfix", "hotfix"],
  "task_name_delimiter": "_",
  "auto_checkout": true
}

TYPES: 
{
  branch_name_template: string;
  project_names: string | string[];
  task_types: string | string[];
  task_name_delimiter?: string;
  auto_checkout?: boolean;
}
  1. Сall npm run cb in the terminal

Config Parameters

  1. branch_name_template

  • meaning: The structure by which the branch name will be generated

  • available properties (Determines which questions will be asked when creating a branch):

    • <task_type>
    • <project_name>
    • <task_id>
    • <task_name>
  1. project_names

  • meaning: If the value is string, then this value will be substituted by default, if - string[] - becomes a list for selection
  1. task_types

  • meaning: Answer options when choosing the type of task

img_2.png

  1. task_name_delimiter

  • meaning: When answering the question about the name of the task, you can use a space or any other separator, but when forming a command, the name of the task will be divided by the specified character (by default, underscore _)
  1. auto_checkout

  • meaning: If the value is true, git checkout -b ${branch_name} will be executed, if false - git branch ${branch_name}

Notes

  • It is not necessary to use all the properties in branch_name_template

  • If, when forming a branch name, you skip any of the input steps (namely water, and not selection from the list), then this property will be excluded from the final branch name