yun-cli
Version:
A simple CLI for scaffolding Vue.js projects with yun-ui.
17 lines (13 loc) • 423 B
JavaScript
var exec = require('child_process').execSync
module.exports = function () {
var name
var email
try {
name = exec('git config --get user.name')
email = exec('git config --get user.email')
} catch (e) {
}
name = name && JSON.stringify(name.toString().trim()).slice(1, -1)
email = email && (' <' + email.toString().trim() + '>')
return (name || '') + (email || '')
}