Skip to content

Commit

Permalink
update prereqs and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Aug 25, 2023
1 parent f4395d2 commit 3e2791c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 11 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ How to change Node version:
- `nvm install 18` (or whichever version you want)
- `nvm use 18`

### Installation
### Installation / Command Line Arguments

- `yarn install` to install required node modules.
- `yarn start` to open the dev environment to preview the website.
- `yarn build` to build the website locally (needed if you want to test the search function before deployment).
- Deployment is handled by the files in `github/workflows`
- `yarn format` for code formatting

## Contribution Guidelines

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "cross-env NODE_ENV='test' jest",
"prepare": "husky install",
"lint-staged": "lint-staged",
"prettier": "prettier --write ."
"format": "prettier --write ."
},
"devDependencies": {
"@babel/core": "^7.17.10",
Expand Down
3 changes: 0 additions & 3 deletions website/docs/backend_prereqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ We use Yarn for this wiki. Run this _after_ you have set up npm. You may have to

- IDE: Use any you like, VSCode is a personal favorite of mine.
- For VSCode install appropriate extensions for Vue, Javascript, etc
- Vue Browser Debug Tools: [https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd?hl=en](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd?hl=en)
- Allows you to debug vue store in browser, e.g. `vue.$store.getters["map/building_1/description"]`
- ![Screenshot](https://media.discordapp.net/attachments/1018323831468851202/1062557315640873030/image.png?width=1440&height=606)

### MySQL Workbench

Expand Down
4 changes: 2 additions & 2 deletions website/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ If you haven't already, please read through and follow those instructions first
- `sam local start-api` for backend
- As a general rule of thumb, you need to have Docker Desktop open in the background to run backend locally
- [automated-jobs](https://github.com/OSU-Sustainability-Office/automated-jobs) will use syntax `node <filename.js>`
- This wiki can be compiled with `npm start`
- `npm run format` or `yarn prettier` (for wiki) are for auto-formatting code
- This wiki can be compiled with `yarn start`
- `npm run format` or `yarn format` (for wiki) are for auto-formatting code
- For more specific info, see the `README.md` or `package.json` of the individual repos as seen [here](getting_started#active-projects)
- Note that some projects host separate `package.json` for backend folders
- See [frontend prereqs](frontend_prereqs) and [backend prereqs](backend_prereqs) docs also; they are written mostly for energy-dashboard but should apply to most other Vue applications we use
Expand Down
30 changes: 26 additions & 4 deletions website/docs/frontend_prereqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,39 @@ description: Frontend software that must be installed in advance (Open Source Fr

## Pre-Reqs to Install

- Node Version Manager (nvm):
### NPM

- NPM: [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- You probably have this but just in case

### Yarn

We use Yarn for this wiki. Run this _after_ you have set up npm. You may have to re-run this if you switch NodeJS versions with NVM as listed below.

- `npm install --global yarn`
- https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable

### NVM / NodeJS

- Node Version Manager (nvm):
- This isn’t required but I highly recommend it (very annoying to switch NodeJS versions otherwise).
- **This one is for Apple / Linux**: [https://github.com/nvm-sh/nvm](https://github.com/nvm-sh/nvm)
- **Use this one for Windows**: [https://github.com/coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows)
- Make sure to uninstall existing Node installation just in case: [https://github.com/coreybutler/nvm-windows#installation--upgrades](https://github.com/coreybutler/nvm-windows#installation--upgrades)
- Read instructions in the repo README for general tips on installing specific node versions.
- Use Node 16 ( `nvm use 16 `)
- Use Node 18 ( `nvm use 18 `)

### Browser Debug Tools

- Inspect Element (right click > inspect in Chrome or Firefox)
- Vue Browser Debug Tools: [https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd?hl=en](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd?hl=en)
- Allows you to debug vue store in browser, e.g. `vue.$store.getters["map/building_1/description"]`
- ![Screenshot](https://media.discordapp.net/attachments/1018323831468851202/1062557315640873030/image.png?width=1440&height=606)

### IDE

- Read specific repo README for specifics (see [Getting Started](getting_started)), but in general:
- Run `npm run serve` in the frontend directory to run it.
- IDE: Use any you like, VSCode is a personal favorite of mine.
- For VSCode install appropriate extensions for Vue, Javascript, etc

## Running the Frontend

Expand Down
2 changes: 2 additions & 0 deletions website/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Our Github Org: https://github.com/OSU-Sustainability-Office

## Contributing

- See [frontend prereqs](frontend_prereqs) doc for setup instructions for running the frontend locally
- See [backend prereqs](backend_prereqs) doc for setup instructions for running the backend locally
- Any Frontend work is open to PR's / open source
- Anything touching backend, including our NodeJS server (running locally), running AWS backend locally, or running AWS CRON jobs (for automated-jobs) can only be done by paid OSU Sustainability Office employees for security reasons
- Open source contributors can run the production API endpoints for energy-dashboard and carbon-calculator, for debugging frontend-only issues

0 comments on commit 3e2791c

Please sign in to comment.