IfBots is a learning lab from ACM TeachLA made to help students in the Intro to Programming with Python class understand how conditionals, also know as if/else statements, work. Students progress through six stages, each increasing in difficulty, having them assess what the correct output should be based on their current stats and the code given to them. This project was deployed with Netlify and uses react-router, react-rewards, react-modal and react-syntax-highlighter.
We'll use a really common Node.js project workflow + Yarn! First, let's clone our repository, and install all of our yarn dependencies:
git clone https://github.com/uclaacm/ifbots.git
cd ifbots
If you don't have yarn installed...
npm install --global yarn
Then install our dependencies!
yarn install
yarn prepare
(If the above commands don't work even after installing yarn via npm, check this npm installation guide, click on alternatives, choose your operating system, and follow the steps there!)
(We handle the yarn and npm conflict issues within our .gitignore we set up so dw about it!)
To start our app, you just need to run yarn start!
yarn start
And to build our project for production (with CRA and Webpack's bundling with all that goodness),
yarn run build
Thanks for your interest in contributing to IfBots! ❤️
Here's a quick guide on how to get started.
- Either make a new branch or a fork of this repository.
mainis a protected branch, so you cannot push to it. - Follow the instructions in "Development Setup" above. If you're on a fork, replace the URL with the fork's URL; if you're on a different branch, check it out using
git checkout. - Beep boop away!
- Before you push, make sure your app runs with
yarn start. If there are any errors, our CI/CD service will reject your build. - Once you're ready, stage and commit your changes!
- Make a pull request with your changes, and let someone on your project team know. a. Netlify has a neat feature called "Deploy Previews" that give you a link to preview your changes; see the blog post for more info!
- If your code passes code review, then we can merge it into
main. Congratulations! If you'd like, it's now safe to delete your branch/fork.
By running yarn lint-fix we can use the linter that we set-up to format our code the way that passes our style checks! Before you commit your changes and submit a pull request, make sure to run
yarn lint-fix
With Husky, we run yarn lint-staged automatically before you commit! If you want to lint before commiting, you can run yarn lint-fix.
- Preloading Images - if rendering images gets annoying because it's slow: Link Example here
This project and its code are licensed under the MIT License. You're free to use them however you wish, though we'd love to hear from you if you found this useful!