Einrichten der Entwicklungsumgebung

Ordnerstruktur:

Installation der benötigten node-Module:

npm init
npm install phaser typescript

Konfiguration des Compilers

Auf der obersten Verzeichnisebene im Projekt erstellen wir die Datei tsconfig.json:

{
    "compilerOptions": {
        "target": "es6",
        "module": "es6",
        "outDir": "./htdocs/js",
        "sourceMap": true,
        "types": [
            "phaser"
        ],
        "typeRoots": [
            "./node_modules/phaser/types"
        ],
    },
    "include": ["./src/**/*"]
}
Drucken/exportieren
QR-Code
QR-Code schule:klassen:2022:wsem:boulders:vsc:start (erstellt für aktuelle Seite)