public:computer:vscode

This is an old revision of the document!


Visual Studio Code

  • ⌘ + /; comment in/out
  • ⌘ + ⇧ + p; command palette
  • ⌘ + p; search
  • ∧ + ⇧ + `; Terminal
  1. Install JDK
  2. Install VS Code Extentions
  • Run with Live Server; CTRL + ALT + N
  • Run with F5; .vscode
    • launch.json
      {
          "version": "0.2.0",
          "configurations": [
              {
                  "type": "node",
                  "request": "launch",
                  "name": "Launch Program",
                  "program": "${workspaceFolder}/typescript/out/hello.js",
                  "outFiles": ["${workspaceFolder}/**/*.js"]
              }
          ]
      }
      
    • tasks.json; Start ts-watch, CTRL + SHIFT + B
      {
          "version": "2.0.0",
          "tasks": [
              {
                  "type": "typescript",
                  "tsconfig": "tsconfig.json",
                  "option": "watch",
                  "problemMatcher": [
                      "$tsc-watch"
                  ],
                  "group": "build"
              }
          ]
      }
      
  • Run with nodemon (live compile environment);
    $ npm install ts-node --save-dev
    $ npm install nodemon --save-dev
    
    • package.json
      {
        "name": "typescript",
        "version": "1.0.0",
        "description": "",
        "main": "index.js",
        "scripts": {
          "start": "npm run build:live",
          "build": "tsc -p .",
          "build:live": "nodemon --watch '*.ts' --exec 'ts-node' hello.ts",
          "test": "echo \"Error: no test specified\" && exit 1"
        },
        "keywords": [],
        "author": "",
        "license": "ISC",
        "devDependencies": {
          "nodemon": "^2.0.20",
          "ts-node": "^9.1.1",
          "typescript": "^4.2.4"
        }
      }
      
        

Vue.js

React.js


  • public/computer/vscode.1672725470.txt.gz
  • Last modified: 2023/01/03 14:57
  • by alex