Merge pull request #37 from transitive-bullshit/feature/typescript-support-v2
add typescript support v2
This commit is contained in:
parent
faba0e5f9e
commit
c0769c2743
45 changed files with 2544 additions and 6662 deletions
|
@ -14,6 +14,7 @@ const pkg = require('../package')
|
|||
module.exports = async (info) => {
|
||||
const {
|
||||
manager,
|
||||
template,
|
||||
name
|
||||
} = info
|
||||
|
||||
|
@ -25,7 +26,7 @@ module.exports = async (info) => {
|
|||
info.dest = dest
|
||||
await mkdirp(dest)
|
||||
|
||||
const source = path.join(__dirname, '../template')
|
||||
const source = path.join(__dirname, '..', 'template', template)
|
||||
const files = await globby(source, {
|
||||
dot: true
|
||||
})
|
||||
|
@ -39,7 +40,7 @@ module.exports = async (info) => {
|
|||
info
|
||||
})
|
||||
})
|
||||
ora.promise(promise, `Copying template to ${dest}`)
|
||||
ora.promise(promise, `Copying ${template} template to ${dest}`)
|
||||
await promise
|
||||
}
|
||||
|
||||
|
@ -98,14 +99,12 @@ module.exports.initPackageManager = async (opts) => {
|
|||
{
|
||||
cmd: `${info.manager} link`,
|
||||
cwd: dest
|
||||
}
|
||||
].concat(info.manager === 'yarn' ? [
|
||||
},
|
||||
{
|
||||
cmd: `${info.manager}`,
|
||||
cmd: `${info.manager} install`,
|
||||
cwd: example
|
||||
}
|
||||
] : [ ]
|
||||
)
|
||||
]
|
||||
|
||||
return pEachSeries(commands, async ({ cmd, cwd }) => {
|
||||
return execa.shell(cmd, { cwd })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue