material ui: (forget the command...)
react-router-dom: npm install ...
@material-ui/icons: npm install @material-ui/icons
styled-components: npm install --save styled-components
-
Create an empty git remote repository
-
create-react-app react-shop
-
cd react-shop & npm install gh-pages --save-dev
-
add {"homepage": "https://liliancai.github.io/react-shop",scripts. { "predeploy": "npm run build"}, "deploy": "gh-pages -d build"}} in package.json
-
git init & git remote add origin https://github.com/liliancai/react-shop.git
-
npm run deploy
-
check https://liliancai.github.io/react-shop, if 404 wait 5 minutes.
PS: try rm -rf node_modules/gh-pages/.cache if error prompted