charlike
Version:
Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options
16 lines (12 loc) • 349 B
JavaScript
;
const gitconfig = require('gitconfiglocal');
const pify = require('pify');
module.exports = dir => {
return pify(gitconfig)(dir || process.cwd()).then(config => {
var url = config.remote && config.remote.origin && config.remote.origin.url;
if (!url) {
throw new Error('Couldn\'t find origin url');
}
return url;
});
};