1 | const path = require('path')
|
2 |
|
3 | module.exports.isLocalPath = function (templatePath) {
|
4 | return /^[./]|(^[a-zA-Z]:)/.test(templatePath)
|
5 | }
|
6 |
|
7 | module.exports.getTemplatePath = function (templatePath) {
|
8 | return path.isAbsolute(templatePath)
|
9 | ? templatePath
|
10 | : path.normalize(path.join(process.cwd(), templatePath))
|
11 | }
|