This is a template application that includes React, Bootstrap and FontAwesome. Start a new application by cloning this repository.
Open Terminal (you'll probably also want to add this to the dock), and type:
xcode-select --install
Click "Install" from the software update popup window.
Download Node and install.
Download Atom and install. Atom is a "hackable text editor" for editing code.
Clone this repository, replacing my-app
with the name of your application.
git clone git@github.com:gnits-map-projects/react-template-app.git my-app
cd my-app/
In git, the origin is an alias for the remote repository from which we cloned. Remove the origin, since we don't want to update the react-template-app
repository!
git remote rm origin
To check that the origin was removed:
git remote -v
Update package.json
with the name of your application. Name your application whatever you used instead of my-app
.
npm init
Update <title>
in ./public/index.html to be something like "My App".
Replace the README.
Create a new repository on Github. Name your repository whatever you used instead of my-app
.
Push your repository to Github, replacing with your username and the name of your application.
git remote add origin git@github.com:theojapa/my-app.git
git push -u origin master
Install dependencies (e.g., React) since their sources are not saved with your application in source control.
npm install
This installs the dependencies specified in ./package.json. If you peek in ./node_modules
, you'll see a whole lot of stuff. That's because your dependencies have dependencies, and so on.
npm start
The application should now be running in your browser at http://localhost:8080/. It'll automatically be refreshed when you make code changes. Change something in App.js to see this in action.