#!/bin/bash script_folder=`dirname $0` foldername="$1" echo "maker folder $maker_folder" echo "folder name $foldername" 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 https://medium.com/@notrab/getting-started-with-create-react-app-redux-react-router-redux-thunk-d6a19259f71f #TODO: integrate react-router-bootstrap https://github.com/react-bootstrap/react-router-bootstrap # disable auto-open browser sed -i "s_console.log(chalk.cyan('Starting the development server_//console.log(chalk.cyan('Starting the development server_g" node_modules/react-scripts/scripts/start.js sed -i 's_openBrowser(_//openBrowser(_g' node_modules/react-scripts/scripts/start.js # add to .gitignore echo "" >> .gitignore echo "*.swp" >> .gitignore # add to package.json sed -i 's/"name": "/"name": "@brwong\//g' package.json sed -i 's/"private": true/"private": true,\n "author": "Brandon Wong (https:\/\/www.brwong.net\/)"/g' package.json # add to index.html sed -i "s_React App_$(echo $foldername | sed 's/-client$//g')_" public/index.html sed -i 's_ _\n \n \n \n \n _' public/index.html # copy files cp $script_folder/App.js $script_folder/epics.js $script_folder/index.js $script_folder/reducers.js $script_folder/store.js src/ # initialize git git init .