zoukankan      html  css  js  c++  java
  • vscode + angular

    0、在命令行中,cd到项目下执行:

    npm install

    1、调试-》启动调试-》node.js, 会生成.vscode/launch.json文件

    2、修改launch.json文件"program": "${workspaceRoot}/node_modules/lite-server/bin/lite-server"

    3、任务:配置任务运行程序-》创建Typescript项目,生成tasks.json

    4、Ctrl+Shift+B 运行,会报错,需要.vscode目录下增加settings.json文件:

    // 将设置放入此文件中以覆盖默认值和用户设置。
    {
        "typescript.tsdk": "node_modules/typescript/lib",
    
        // ts 项目, 隐藏 .js 和 .js.map 文件
        "files.exclude": {
            "node_modules": true,
            "**/*.js": { "when": "$(basename).ts" },
            "**/*.js.map": true
        }
    
    }
    

      修改tasks.json文件:

    {
        // See https://go.microsoft.com/fwlink/?LinkId=733558
        // for the documentation about the tasks.json format
        "version": "0.1.0",
        "command": "cmd",
        "isShellCommand": true,
        "showOutput": "always",
        "args": ["/C npm start"]
    }
    

     6、Ctrl+Shift+B 运行Ok,弹窗自动访问http://localhost:3000/

  • 相关阅读:
    nginx php-fpm 输出php错误日志
    图解phpstorm常用快捷键
    Mysq性能分析 —— Genral log(普通日志)与 Slow log(慢速日式)
    Mac Terminal
    Git安装与配置
    Linux ulimit
    tcpdump
    Linux 基础
    TCP
    HTTP
  • 原文地址:https://www.cnblogs.com/ivan0626/p/6682614.html
Copyright © 2011-2022 走看看