easy-mock-group-cli
Version:
Create api.js for Easy-Mock-Group.
16 lines (12 loc) • 416 B
JavaScript
// https://github.com/vuejs/vue-cli/blob/master/lib/local-path.js
var path = require('path')
module.exports = {
isLocalPath: function (templatePath) {
return /^[./]|(^[a-zA-Z]:)/.test(templatePath)
},
getTemplatePath: function (templatePath, projectPath) {
return path.isAbsolute(templatePath)
? templatePath
: path.normalize(path.join(projectPath || process.cwd(), templatePath))
}
}