Which terms did you search for in User Guide?
According to CRA doc: https://create-react-app.dev/docs/adding-typescript/#getting-started-with-typescript-and-react tsconfig.json
will be created automatically
Running script form this section https://github.com/react-workspaces/react-workspaces-playground#creating-a-new-cra-app does not create it
Expected behavior
running npx create-react-app --scripts-version @react-workspaces/react-scripts --template typescript shared
should create tsconfig.json file in root folder
Actual behavior
npx create-react-app --scripts-version @react-workspaces/react-scripts --template typescript shared
tsconfig.json
has not beed created
![Screen Shot 2020-03-06 at 20 05 21](https://user-images.githubusercontent.com/26203362/76105518-28368580-5fe6-11ea-8415-434174ffa7c4.png)
This message is absent in following output, however it is present while using default react-scripts
We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you. Your tsconfig.json has been populated with default values.
output
npx: installed 99 in 7.186s
Creating a new React app in /Users/ivan/projects/monorepo/workspace-no-es5/packages/shared.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and @react-workspaces/react-scripts with cra-template-typescript...
yarn add v1.15.2
[1/4] π Resolving packages...
[2/4] π Fetching packages...
warning Pattern ["[email protected]"] is trying to unpack in the same destination "/Users/ivan/Library/Caches/Yarn/v4/npm-react-16.13.0-d046eabcdf64e457bbeed1e792e235e1b9934cf7/node_modules/react" as pattern ["react@^16.13.0"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["[email protected]"] is trying to unpack in the same destination "/Users/ivan/Library/Caches/Yarn/v4/npm-react-dom-16.13.0-cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866/node_modules/react-dom" as pattern ["react-dom@^16.13.0"]. This could result in non-deterministic behavior, skipping.
[3/4] π Linking dependencies...
warning "workspace-aggregator-0bcca8c9-25ac-45a2-b068-d4557dfa6570 > web > @react-workspaces/react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] π¨ Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.22.1", while you're on "1.15.2".
info To upgrade, run the following command:
$ brew upgrade yarn
success Saved 4 new dependencies.
info Direct dependencies
info All dependencies
ββ @react-workspaces/[email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
β¨ Done in 21.48s.
Removing template package using yarnpkg...
yarn remove v1.15.2
[1/2] π Removing module cra-template-typescript...
[2/2] π¨ Regenerating lockfile and installing missing dependencies...
warning "workspace-aggregator-fd2495c5-560c-41a6-aec9-54235e0c6177 > shared > @react-workspaces/react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
success Uninstalled packages.
β¨ Done in 9.47s.
Initialized a git repository.
Success! Created shared at /Users/ivan/projects/monorepo/workspace-no-es5/packages/shared
Inside that directory, you can run several commands:
yarn start
Starts the development server.
yarn build
Bundles the app into static files for production.
yarn test
Starts the test runner.
yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you canβt go back!
We suggest that you begin by typing:
cd shared
yarn start
Happy hacking!
npx create-react-app --template typescript shared-copy
tsconfig.json
has been fcreated
![Screen Shot 2020-03-06 at 20 05 16](https://user-images.githubusercontent.com/26203362/76105534-2a004900-5fe6-11ea-87cf-433e26f92e5c.png)
output
npx: installed 99 in 8.969s
Creating a new React app in /Users/ivan/projects/monorepo/workspace-no-es5/shared-copy.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template-typescript...
yarn add v1.15.2
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
warning "react-scripts > [email protected]" has incorrect peer dependency "[email protected]".
warning "react-scripts > @typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] π¨ Building fresh packages...
success Saved lockfile.
success Saved 9 new dependencies.
info Direct dependencies
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
info All dependencies
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
β¨ Done in 17.98s.
Initialized a git repository.
Installing template dependencies using yarnpkg...
yarn add v1.15.2
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
warning "react-scripts > [email protected]" has incorrect peer dependency "[email protected]".
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=5".
[4/4] π¨ Building fresh packages...
success Saved lockfile.
success Saved 25 new dependencies.
info Direct dependencies
ββ @testing-library/[email protected]
ββ @testing-library/[email protected]
ββ @testing-library/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
info All dependencies
ββ @babel/[email protected]
ββ @sheerun/[email protected]
ββ @testing-library/[email protected]
ββ @testing-library/[email protected]
ββ @testing-library/[email protected]
ββ @testing-library/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ @types/[email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
ββ [email protected]
β¨ Done in 11.80s.
We detected TypeScript in your project (src/App.test.tsx) and created a tsconfig.json file for you.
Your tsconfig.json has been populated with default values.
Removing template package using yarnpkg...
yarn remove v1.15.2
[1/2] π Removing module cra-template-typescript...
[2/2] π¨ Regenerating lockfile and installing missing dependencies...
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=5".
warning "react-scripts > [email protected]" has incorrect peer dependency "[email protected]".
success Uninstalled packages.
β¨ Done in 16.67s.
Created git commit.
Success! Created shared-copy at /Users/ivan/projects/monorepo/workspace-no-es5/shared-copy
Inside that directory, you can run several commands:
yarn start
Starts the development server.
yarn build
Bundles the app into static files for production.
yarn test
Starts the test runner.
yarn eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you canβt go back!
We suggest that you begin by typing:
cd shared-copy
yarn start
Happy hacking!
Seem like checking happens in this function
|
function verifyNoTypeScript() { |