Quantcast
Viewing all articles
Browse latest Browse all 8697

npmでReactのプロジェクト作成

npx create-react-app プロジェクト名

プロジェクト作成すると下記画面が表示される

Success! Created react-app at /Users/xxx/Myapp/React/learning/react-app
Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run 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 react-app
  npm start

上記の画面にはコマンド毎の操作説明が表示されており、こちらのコマンドはnpmの他にyarnでも実行可能

1.yarn start又は npm start
・webブラウザを起動
2.yarn build又は npm run build
・プロジェクトのビルド(プロジェクトのファイルから実際のWebサーバーにアップロードして利用するファイル類を生成する)
3.yarn test又は npm test
・テストプログラムを実行して、アプリケーションのテストを行う
4.yarn eject又は npm run eject
・プロジェクトのインジェクトを行う


Viewing all articles
Browse latest Browse all 8697

Trending Articles