@iamxiyang/gclone

2.0.1 • Public • Published

gclone

中文说明

gclone is a tool for cloning Git projects. It not only performs basic git clone operations but also automatically performs additional tasks after cloning, such as modifying Git configurations, installing dependencies, and opening an editor.

Key Features

  • Automatically applies different configurations based on different Git environments.
  • Optionally installs project dependencies automatically after cloning.
  • Optionally opens the VSCode editor automatically after cloning.

How to Use?

Installation Steps

  • Using npm:

    npm i -g @iamxiyang/gclone
  • Using pnpm:

    pnpm add -g @iamxiyang/gclone

Configuration Settings

Run the following command to open the configuration file and modify it as needed. You can repeat this command to make further changes.

gclone-config

Example configuration file:

{
  // Default configuration, applicable to all cases
  '.': {
    git: {
      name: '', // Default Git author
      email: '', // Default Git author email
    },
    node: {
      install: false, // Whether to automatically install dependencies
      package: 'npm', // Package management tool to use when a package.json is present in the project; leave empty to auto-detect
    },
    editor: {
      vscode: true, // Whether to automatically open the project with VS Code
    },
  },
  // Configuration applicable only to GitHub addresses
  'github.com': {
    git: {
      name: '',
      email: '',
    },
    node: {
      install: false,
      package: '',
    },
    editor: {
      vscode: false,
    },
  },
  // Configuration applicable only to xx.com addresses
  'xx.com': {},
}

Usage Example

Use gclone instead of git clone to clone a project. gclone supports all parameters of git clone.

gclone https://github.com/iamxiyang/glone.git [other parameters]

With these steps, you can easily clone projects using gclone and perform additional tasks as needed.

Readme

Keywords

Package Sidebar

Install

npm i @iamxiyang/gclone

Weekly Downloads

4

Version

2.0.1

License

MIT

Unpacked Size

12.9 kB

Total Files

8

Last publish

Collaborators

  • iamxiyang