Automatically create a tsconfig.json when entrypoint is TypeScript

This commit is contained in:
Joe Haddad
2018-10-22 08:24:48 -04:00
parent 680cf9371a
commit e0939b6262
2 changed files with 5 additions and 2 deletions

View File

@@ -21,7 +21,10 @@ function writeJson(fileName, object) {
function verifyTypeScriptSetup() {
if (!fs.existsSync(paths.appTsConfig)) {
return;
if (!paths.appIndexJs.match(/\.ts?$/)) {
return;
}
writeJson(paths.appTsConfig, {});
}
const isYarn = fs.existsSync(paths.yarnLockFile);