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