12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #!/bin/bash
- script_folder=`dirname $0`
- foldername="$1"
- echo "maker folder $maker_folder"
- echo "folder name $foldername"
- /home/nxe0003/nodebootstraptest/node_modules/.bin/create-react-app $foldername
- cd $foldername
- # add packages
- yarn add react-bootstrap \
- redux react-redux \
- react-router react-router-dom react-router-redux@next \
- rxjs redux-observable
- #TODO: integrate react-router routes
- #TODO: integrate react-router-bootstrap https://github.com/react-bootstrap/react-router-bootstrap
- # add to .gitignore
- echo "" >> .gitignore
- echo "*.swp" >> .gitignore
- # add to package.json
- sed -i 's/"private": true/"private": true,\n "author": "Brandon Wong <projects@brwong.net> (https:\/\/www.brwong.net\/)"/g' package.json
- # add to index.html
- sed -i 's_ </head>_\n <!-- Bootstrap CSS -->\n <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">\n <!-- Optional Bootstrap theme -->\n <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap-theme.min.css">\n </head>_' public/index.html
- # copy files
- cp $script_folder/epics.js $script_folder/index.js $script_folder/reducers.js $script_folder/store.js src/
|