This project will allow you to switch quickly between lecture examples, breakout exercises, etc without cloning multiple projects. The folder structure of the base install has been altered slightly:
- There is no App folder inside src/ after the initial install. It is created during './load.sh' to clean up gitignore issues. this means npm start will not work out of the box! keep reading
- index.js now imports App from './App/App';
- There are two new folders: /scripts and /projects.
npm install
as normal- Mac users: in top directory run:
chmod +x scripts/*
./load.sh
to choose the react app to load. (see below for more info)npm start
to start server
To run scripts - command line from inside scripts folder, run the script preceded by "./" (This will auto-complete with TAB)
-
./load.sh
- creates src/App and copies contents of project/'project name' into it- have to type the project name completely and correctly. Does NOT autocomplete with TAB
load.sh
while server is running will switch the server to the selected project - no need to re-runnpm start
-
./save.sh
- saves contents of src/App/ folder into project/'project name' folder- only necessary if you make changes to the project after loading it into the base install
- this will save to the correct folder automatically (if the project folder includes a proj/"name of project")
-
./create.sh
- creates new project/'project name' folder, saves contents of current base/src/App/ folder into it- creates proj/'project name' to allow saving automatically
The project/ folders contain only the contents of the App/ folder for that project, and eventually a README for each project
- base (simple base app for creating new projects)
- intro
- second_app
- admin_page
- auth_routes
- bootstrap_react
- dynamic_nested_routing
- exercise_bootstrap
- history_object
- hooks
- hp_character_page
- menu_app
- recipe_app
- refresher_1
- routing_example