Skip to content

Commit 3964653

Browse files
committed
Fix TypeScript verification
1 parent 565fc1a commit 3964653

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/react-scripts/scripts/init.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ module.exports = function(
206206
if ((!isReactInstalled(appPackage) || templateName) && args.length > 1) {
207207
console.log();
208208
console.log(`Installing template dependencies using ${command}...`);
209-
console.log();
210209

211210
const proc = spawn.sync(command, args, { stdio: 'inherit' });
212211
if (proc.status !== 0) {
@@ -215,12 +214,12 @@ module.exports = function(
215214
}
216215
}
217216

218-
if (appPackage.dependencies['typescript'] != null) {
217+
if (args.find(arg => arg.includes('typescript'))) {
218+
console.log();
219219
verifyTypeScriptSetup();
220220
}
221221

222222
// Remove template
223-
console.log();
224223
console.log(`Removing template package using ${command}...`);
225224
console.log();
226225

tasks/e2e-installs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ exists tsconfig.json
162162
exists src/react-app-env.d.ts
163163
checkTypeScriptDependencies
164164

165+
node node_modules/react-scripts/scripts/utils/verifyTypeScriptSetup.js
166+
165167
# Check that the TypeScript template passes smoke tests, build, and normal tests
166168
yarn start --smoke-test
167169
yarn build

0 commit comments

Comments
 (0)