1
0
Fork 0

Merge pull request #51 from zachwolf/template-path

Template path
This commit is contained in:
Travis Fischer 2018-08-14 11:30:07 -05:00 committed by Joost De Cock
parent 15b1b808df
commit 534eb109e9
5 changed files with 35 additions and 4 deletions

View file

@ -15,6 +15,7 @@ module.exports = async (info) => {
const {
manager,
template,
templatePath,
name
} = info
@ -26,7 +27,9 @@ module.exports = async (info) => {
info.dest = dest
await mkdirp(dest)
const source = path.join(__dirname, '..', 'template', template)
const source = template === 'custom'
? path.join(process.cwd(), templatePath)
: path.join(__dirname, '..', 'template', template)
const files = await globby(source, {
dot: true
})