UNPKG

@yuanhua/cli

Version:
14 lines (11 loc) 306 B
const path = require('path'); module.exports = { isLocalPath(templatePath) { return /^[./]|(^[a-zA-Z]:)/.test(templatePath); }, getTemplatePath(templatePath) { return path.isAbsolute(templatePath) ? templatePath : path.normalize(path.join(process.cwd(), templatePath)); }, };