mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-23 12:48:00 +08:00
Automatically create a tsconfig.json when entrypoint is TypeScript
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user