Skip to content

beenotung/npm-setup-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-setup-git

npm cli tool to setup git repository fields in package.json and .gitignore

npm Package Version

Introduction

In the previous version of npm cli, it auto setup the git repository fields in the package.json file as below if the current working directory is a git repository. However recent version of npm cli no longer setup it automatically.

This cli package helps you setup the fields in package.json, and it also auto setup some commonly ignored files in the .gitignore file.

Example git repository fields in package.json:

{
  "repository": {
    "type": "git",
    "url": "git+https://github.com/beenotung/npm-setup-git.git"
  },
  "homepage": "https://github.com/beenotung/npm-setup-git#readme",
  "bugs": {
    "url": "https://github.com/beenotung/npm-setup-git/issues"
  }
}

Installation (optional)

npm i -g npm-setup-git

Usage

Usage with global installation:

npm-setup-git

Usage without installation:

npx -y npm-setup-git

License

This project is licensed with BSD-2-Clause

This is free, libre, and open-source software. It comes down to four essential freedoms [ref]:

  • The freedom to run the program as you wish, for any purpose
  • The freedom to study how the program works, and change it so it does your computing as you wish
  • The freedom to redistribute copies so you can help others
  • The freedom to distribute copies of your modified versions to others