UNPKG

lianghaijie-cli

Version:

A simple CLI for scaffolding futu5_ipo projects.

24 lines (21 loc) 576 B
const path = require('path') module.exports = { /** * 是否是本地路径 * @param {[type]} templatePath [description] * @return {Boolean} [description] */ isLocalPath (templatePath) { return /^[./]|(^[a-zA-Z]:)/.test(templatePath) }, /** * 获取绝对路径 * @param {[type]} templatePath [description] * @return {[type]} [description] */ getTemplatePath (templatePath) { return path.isAbsolute(templatePath) ? templatePath : path.normalize(path.join(process.cwd(), templatePath)) } }