Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 455 Bytes

.verb.md

File metadata and controls

18 lines (13 loc) · 455 Bytes

Usage

Requires Node.js {%= engines.node %}.

Project name

The project name is resolved in this order:

  1. Check for package.json, if it exists name is returned
  2. Check for git repository, if it exists return the name parsed from the remote origin URL
  3. Otherwise, use path.basename(process.cwd())
const name = require('{%= name %}');
console.log(name());
// or
console.log(name('some/file/path'));