通过create-react-app脚手架创建的react示例项目
create-react-app hello-react
Inside the "hello-react" directory, you can run several commands:
yarn start
starts the development server. This command can open default Browser.
yarn build
Bundles the app into static files for production.
After compiled successfully, the builded files(file size after gzip) in "build" directory,
The build folder is reader to be deployed.
You may serve it with a static server by the following commands:
1: yarn global add serve //install serve by yarn, and this is the global installing
2: serve -s build // boot the serve.
yarn test
Starts the test runner.
yarn eject
Remove this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this , you can't go back.
git init
git add .
git commit -m "first commit"
git remote add origin /~https://github.com/yinfan9527/hello-react.git
git push -u origin master