This repo holds every associated with http://fairviewrobotics.org/
This is a react application and thus is a single page app, to learn more look at the react readme
This project uses npm (node package manager). NPM downloads libraries that we can use, saving us loads of time. Checkout this stack overflow question for a quick answer and this sitepoint article for more detail information.
NOTE:
You are going to have to install NPM and nodejs. NPM is install with node.
Answer:
First install everything: npm install
Then run the dev server: npm start
Done!
Travis ci does all the heavy lifting for us! Travis will build the project and will then automatically delploy it to surge (surge is the site that hosts our files on the web, a better github.io) for us! Also, both travis ci and surge are free!
We are using a cool method of including css called CSS Modules.
This allows us to isolate css to a certain component. Behind the scenes custom-react-scripts
is handling the transformation for us. The way it works is a module css classes will be appended a unique name to differnate itself from other classes.
For example, css module with class .container
in the component Header might become .header-container
.
Why would we want this? see some reasons here.
We can still use global css classes. You just create a file without .module.css
, instead use the regular style .css
.
Why .module.css
for CSS modules? That's just how custom-react-scripts identifies modules.
NOTE:
NPM scripts that are custom
need to start like so npm run COMMAND
Also, the deploy command runs the build command (npm run build
) then deploys the build folder using gh-pages up to the gh-pages branch.