zoukankan      html  css  js  c++  java
  • sublime配置node开发环境

    下载node插件

    https://github.com/tanepiper/SublimeText-Nodejs

    下载zip压缩包后解压,文件名改为Node

    打开文件“Nodejs.sublime-settings”改为如下样子

    {
      // save before running commands
      "save_first": true,
      // if present, use this command instead of plain "node"
      // e.g. "/usr/bin/node" or "C:in
    ode.exe"
      "node_command": "D:\node\node.exe",//node的地址
      // Same for NPM command
      "npm_command": "D:\node\npm.cmd",//cmd的地址
      // as 'NODE_PATH' environment variable for node runtime
      "node_path": false,
    
      "expert_mode": false,
    
      "output_to_new_tab": false
    }

    打开文件“Nodejs.sublime-build”改为如下样子

    {
      "cmd": ["node", "$file"],
      "file_regex": "^[ ]*File "(...*?)", line ([0-9]*)",
      "selector": "source.js",
      "shell": true,
      "encoding": "utf8",
      "windows":
        {
          "shell_cmd": "taskkill /F /IM node.exe & node $file"
        },
        "linux":
        {
            "shell_cmd": "killall node; /usr/bin/env node $file"
        },
        "osx":
        {
            "shell_cmd": "killall node; /usr/bin/env node $file"
        }
    }

    编写一个测试文件app.js,按“ctrl+B"运行代码,运行结果如下图所示

  • 相关阅读:
    阿里云中挖矿病毒
    flutter 返回刷新页面
    PM2 常用命令
    阿里云Redis 配置
    stm32f407启动文件分析
    C++类的前置声明
    Qt快速入门学习笔记(画图篇)
    Qt快速入门学习笔记(基础篇)
    Qt入门实例
    Qt编码设置
  • 原文地址:https://www.cnblogs.com/aSnow/p/8847941.html
Copyright © 2011-2022 走看看