Requires Node.js {%= engines.node %}.
Project name
The project name is resolved in this order:
- Check for package.json, if it exists
name
is returned - Check for git repository, if it exists return the
name
parsed from the remote origin URL - Otherwise, use
path.basename(process.cwd())
const name = require('{%= name %}');
console.log(name());
// or
console.log(name('some/file/path'));