1. git-repo-name
Get the repository name from the git remote origin URL.
git-repo-name
Package: git-repo-name
Created by: jonschlinkert
Last modified: Sat, 18 Jun 2022 08:34:20 GMT
Version: 1.0.1
License: MIT
Downloads: 379,827
Repository: https://github.com/jonschlinkert/git-repo-name

Install

npm install git-repo-name
yarn add git-repo-name

git-repo-name NPM version NPM downloads Build Status

Get the repository name from the git remote origin URL.

Install

Install with npm:

 $ npm install git-repo-name --save

Usage

 var repoName = require('git-repo-name');

By default process.cwd() is used, but you can alternatively specify a different directory as the first argument.

async

 repoName(function(err, name) {
  //=> 'git-repo-name'
});

sync

 repoName.sync();
//=> 'git-repo-name'

cwd

Optionally specify the directory to use.

async

 repoName('foo', function(err, name) {
  //=> 'repo-foo-name'
});

sync

 repoName.sync('foo');
//=> 'repo-foo-name'

You might also be interested in these projects:

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

 $ npm install verb && npm run docs

Or, if verb is installed globally:

 $ verb

Running tests

Install dev dependencies:

 $ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert.
Released under the MIT license.


This file was generated by verb, v0.9.0, on May 03, 2016.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin