Javascript console for Windows, e.g. AO

I need to work on the Windows platform for the project, and I happen to be doing this project using javascript on the server side (yes, I actually use javascript on the server side). I do most of my analysis and research while working with AO on my Mac, which allows me to write code and return a response from the interpreter and download .js files. Now I search the web and I find most of the results about Firebug or online tools. However, I am looking for something more commanding.

Does anyone have a good recommendation for a JavaScript interpreter / console application for the Windows platform that does not require a browser and can be run from the command line (and supports downloading external .js files)?

Many thanks,

+5
source share
7 answers

node.js has a windows version. The installer is completely non-invasive, all it does is copy files to Program Files and add the path to your system $ PATH env. variable. If you then run node.exe without parameters, it will work as a JavaScript REPL console.

You can download the .js file as follows:

> .load ./file/to/myscript.js

See the REPL page in the node.js manual for more information .

+4

java runtime >= 1.5, jrunscript. java scriptengines, JavaScript .

+2

, ...

(F12), . .
, Firefox Firebug .

- .

+2

- , Windows cscript.exe script /eval/print/loop :

try {
  throw {};
} catch(repl) {
  while (repl.line != '.exit') {
    if (repl.line) {
      repl.err = null;
      try {
        repl.out = eval('(' + repl.line + ')');
      } catch (e) {
        if (e instanceof SyntaxError) {
          try {
            repl.out = eval(repl.line);
          } catch (e) {
            repl.err = e;
          }
        } else {
          repl.err = e;
        }
      }
      if (repl.err) {
        WScript.stdout.writeLine('Error: ' + repl.err.message);
      } else {
        WScript.stdout.writeLine(repl.out == null ? String(repl.out) : (typeof repl.out.toString == 'function' ? repl.out.toString() : Object.prototype.toString.call(repl.out)));
      }
    }
    WScript.stdout.write('> ');
    repl.line = WScript.stdin.readLine();
  }
}

repl.js cscript repl.js, , jsc.

+2

Node.js, JSDB . Node.js , Node.exe, JSDB. .

+1

DeskJS (https://deskjs.wordpress.com). , ! Windows, JavaScript JS . JS, . JS, , . , Sublime Text, JS cmd, e.t.c...

+1

All Articles