简体   繁体   English

Javascript 浏览器外

[英]Javascript outside the browser

I'm looking at writing some code in Javascript to run as a command line program, unrelated to browsers or the Web;我正在考虑在 Javascript 中编写一些代码以作为命令行程序运行,与浏览器或 Web 无关; it would need access to files and directories as normal for a command line utility.对于命令行实用程序,它需要像往常一样访问文件和目录。 What's the best Windows implementation of Javascript for this scenario, with regard to stability and performance?对于这种情况,在稳定性和性能方面,Javascript 的最佳 Windows 实现是什么?

I would take a look at Nodejs我会看看Nodejs

I use jsdb or in windows cscript .我使用jsdb或 windows cscript In some editors (Editplus in my case, i've also use Aptana) you can configure running js-files directly from within the editor.在某些编辑器中(在我的情况下为 Editplus,我也使用 Aptana),您可以直接从编辑器中配置运行的 js 文件。

Ofcourse in jsfiddle.net you could create javascript unrelated to the browser (apart from the output, which can be [console.]logged or written to some div. In some cases it can be a problem that the code is eval led though.当然,在jsfiddle.net中,您可以创建与浏览器无关的 javascript(output 除外,它可以 [console.] 记录或写入某些 div。在某些情况下,代码是eval导致的可能是个问题。

Further, this blog entry may give you extra information此外,此博客条目可能会为您提供额外的信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM