Skip to content
Snippets Groups Projects
vscode.md 2.37 KiB
Newer Older
  • Learn to ignore specific revisions
  • Victor Löfgren's avatar
    Victor Löfgren committed
    # Visual Studio Code
    
    
    The development of this project was mainly done using Visual Studio Code (VS Code).
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    It is not that surprising, then, that we recommend you use it.
    
    ## Extensions
    
    
    When you first open the repository in Visual Studio Code it will ask you to install all recommended extensions, which you should do.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    We used a few extensions to help with the development of this project.
    
    
    The Python and Pylance extensions help with linting Python code, auto imports, syntax highlighting and much more.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    
    Prettier is an extension used to format JavaScript and TypeScript.
    ESLint is used to lint JavaScript and TypeScript code.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    Live Share is an extension thats used to code together at the same time, much like a Google Docs document.
    But there was a few issues with the Python extension that made Live Share hard to work with.
    
    ## Tasks
    
    
    A task in VS Code is a simple action that can be run by pressing `ctrl+shift+p`, searching for and selecting `Tasks: Run Task`.
    These tasks are configured in the `.vscode/tasks.json` file.
    Tasks that are marked as build tasks (starting and testing tasks as well as populate) can also be run with `ctrl+shift+b`.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    A few such tasks has been setup in this project and will be described below.
    
    The `Start server` task will start the server.
    
    The `Start client` task will start the client.
    
    The `Start client and server` task will start both the client and the server.
    
    The `Populate database` task will populate the database with a few competitions, teams, users and such. Look in the `populate.py` to see exactly what it adds. Remember to always run this after changing the structure of the database.
    
    
    The `Test server` task will run the server tests located in the `server/tests/` folder.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    
    The `Open server coverage` task can only be run after running the server tests and will open the coverage report generated by those tests in a web browser.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    
    The `Unit tests` task will run the unit tests for the client.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    
    The `Run e2e tests` task will run the end-to-end tests.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    
    The `Open client coverage` task can only be run after running the client tests (`Unit tests` task) and will open the coverage report generated by those tests in a web browser.
    
    Victor Löfgren's avatar
    Victor Löfgren committed
    
    
    The `Generate documentation` task will generate the project documentation, i.e. this document, in the `docs/build/html/` folder.
    
    
    The `Open documentation` task can only be run after generating the documentation and will open it in a web browser.