Ga naar: NL README
Project Specification
Pre-requisites
- Have Node.js & NPM installed on your machine.
- They usually come together.
- (Optional) Have Python installed
- In order to play with the scoring XLSX to JSON conversion
What to do right after cloning?
- Navigate into the root directory of the project.
- Run
npm i
or npm install
- This installs the
node_modules
required for the project:
- VueJS
- Client-side PDF generation tool
How to run for development?
- Navigate into the root directory of the project.
- Run
npm run dev
- In the terminal, click the URL/address that shows up to open the served PQChoiceAssistant
- This is a development server
- It uses HMR (Hot Module Replacement), meaning if you save a file, the page is automatically updated with the new code.
How to deploy to gh-pages?
- Navigate into the root directory of the project.
- Make sure you are on the
main
branch
- Use
git checkout main
to switch to the main branch.
- Use
git branch
to check which branch you are on.
- Use
git stash
and then git checkout main
in case you have uncommitted changes.
- Run the following commands by copying and pasting them into your terminal (including the
echo
so that there is a newline after the git subtree ...
command to run it):
npm run build
git add .
git commit -m "update"
git push
git add dist -f
git commit -m "adding dist"
git subtree push --prefix dist origin gh-pages
echo done
How to adjust the scoring matrix & see the effect locally?
-
Navigate into the root directory of the project.
-
Go to the scoring directory.
- There you can find the scoring matrix xlsx file.
-
Edit it to your desire.
-
Go back to the project root directory.
-
Run python update_scoring.py
.
- This sets up a venv to not mess with your local packages.
- It also cleans up the venv
-
After the script has ran, the last text in the terminal tells you if everything ran succesfull, or if any errors happened during the process.
- Success message:
All steps completed successfully!
- Failure message: \<Any other message>
-
(extra) It might be required to re-run the npm run dev
command in order to see the changes.