Node.js build system in Sublime Text 2

后端 未结 13 2252
耶瑟儿~
耶瑟儿~ 2020-12-13 06:30

I justed started learning JavaScript. While doing that, I got tired of embedding my JavaScript code into an HTML document in order to run it in the browser. I thought it wou

13条回答
  •  醉话见心
    2020-12-13 07:03

    This woks for me in Windows7

    1) Open Sublime Text, Goto "Tools" -> "Build System" -> "New Build System"

    2) Paste this text

    {

    "cmd": ["C:\\Program Files (x86)\\nodejs\\node","$file"]
    

    }

    \\ Escaping character

    3) Save as Node.sublime-build

    4) Write a new js file, and press CTRL+B for build.

    Click here for see image example.

提交回复
热议问题