Homebrew is a package manager for Mac. To install it, follow the instructions on this link: https://brew.sh/.
To test your install run the following:
brew --versionFollow the instructions at this link https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
To test, use the following command:
git --versionEnter the following
brew install ghFollow the instructions at this linkhttps://nodejs.org/en/download.
To test, use the following:
node -v
npm -vEnter the following:
npm install -g firebase-toolsRun the following command to login to the GitHub CLI.
gh auth loginAnd follow the prompts to login with your github account.
Run the following command from the parent directory you want to store your project in.
git clone https://github.com/drustanyjt/CharlieX.gitTo enter the directory use the cd command like so:
cd CharlieXAnd to install the required packages run the following:
npm installLogin to your firebase (google) account using the following command:
firebase loginTo view the website locally, run the following:
npm run dev You can make changes in your code while the local server is running, and they will be instantly reflected in the website. (This is known as Hot Reloading (or Hot Module Reloading, HMR)).
To let others view your website, you need to deploy it. First make sure your project is initiatied with hosting enabled:
firebase initAnd enabling the hosting:configure files... option
Now use the following firebase command to make your website go live:
firebase deploy --only:hostingThe usual flow for making changes is to pull updates from GitHub onto your local code. Then after you make changes you add them to be staged follwoed by commit to actually save your changes. The last step is to push your code back onto the GitHub repository.
git pull
# Now make some changes to src
git add . # . is to add all changes, you can specify specific changes too
git commit -m "Added a new feature" # Provide a comment for your commit
git push # Put your code back in our GitHubHere are some docs to help you.
pull: https://www.atlassian.com/git/tutorials/syncing/git-pull
add: https://www.atlassian.com/git/tutorials/saving-changes
commit: https://www.atlassian.com/git/tutorials/saving-changes/git-commit
push: https://www.atlassian.com/git/tutorials/syncing/git-push