create-react-app
https://gyazo.com/81c0a5a6f24083c2a77b47152089e82d
プロジェクトを作成する
code:sh
npx create-react-app my-app
cd my-app
npm start
npxで入れると、常に最新バージョンを使用する
npm install -g create-react-appでインストールしている場合は、uninstallすることが推奨されている
カレントディレクトリにプロジェクトを作成する
$ npx create-react-app .
TypeScriptのプロジェクトを作成する
$ npx create-react-app . --template typescript
プロジェクト作成後のディレクトリ
code:tree
.
├── README.md
├── node_modules
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
└── src
├── App.css
├── App.js
├── App.test.js
├── index.css
├── index.js
├── logo.svg
├── serviceWorker.js
└── setupTests.js
TypeScriptプロジェクト作成後のディレクトリ
code:*
.
├── README.md
├── node_modules
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
├── src
│ ├── App.css
│ ├── App.test.tsx
│ ├── App.tsx
│ ├── index.css
│ ├── index.tsx
│ ├── logo.svg
│ ├── react-app-env.d.ts
│ ├── serviceWorker.ts
│ └── setupTests.ts
└── tsconfig.json