JavaScript:适用于Windows的独立编译器或解释器? [英] JavaScript: Standalone compiler or interpreter for Windows?

查看:98
本文介绍了JavaScript:适用于Windows的独立编译器或解释器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可用于 Windows JavaScript 编译器或解释程序是什么?

What are the JavaScript compilers or interpreters available for Windows?

我读过这本书最近 Eloquent JavaScript 。本书介绍了使用JavaScript作为第一语言编程的读者。遗憾的是,程序仅限于在嵌入HTML的浏览器中运行。所以,我想知道是否可以编写可以独立执行的JavaScript程序。

I read the book Eloquent JavaScript recently. This book introduces the reader to programming using JavaScript as the first language. Sadly, the programs are restricted to run inside the browser embedded in HTML. So, I wonder if it is possible to write JavaScript programs that can be executed standalone.

编译器或解释器应该很容易作为预编译的二进制文件提供,可以由初学者下载和安装。他应该能够编写使用此编译器编译的简单独立JavaScript程序。可以使用此编译器的其他JavaScript库,框架,IDE和调试支持将是一个优势。

The compiler or interpreter should be easily available as a pre-compiled binary that can be downloaded and installed by a beginner. He should be able to write simple standalone JavaScript programs that are compiled with this compiler. Additional JavaScript libraries, frameworks, IDEs and debugging support that would work with this compiler would be a plus.

推荐答案

目前还没有人提到,window自带的javascript编译器: http://msdn.microsoft.com /en-us/library/vstudio/7435xtz6(v=vs.100).aspx

Nobody has mentioned yet, window's own javascript compiler: http://msdn.microsoft.com/en-us/library/vstudio/7435xtz6(v=vs.100).aspx

Microsoft (R) JScript Compiler version 8.00.50727
for Microsoft (R) .NET Framework version 2.0.50727
Copyright (C) Microsoft Corporation 1996-2005. All rights reserved.

jsc [options] <source files> [[options] <source files>...]

                         JScript Compiler Options

                           - OUTPUT FILES -
  /out:<file>              Specify name of binary output file
  /t[arget]:exe            Create a console application (default)
  /t[arget]:winexe         Create a windows application
  /t[arget]:library        Create a library assembly
  /platform:<platform>     Limit which platforms this code can run on; must be x86, Itanium, x64, or anycpu, which is the default

                           - INPUT FILES -
  /autoref[+|-]            Automatically reference assemblies based on imported namespaces and fully-qualified names (on by default)
  /lib:<path>              Specify additional directories to search in for references
  /r[eference]:<file list> Reference metadata from the specified assembly file
                           <file list>: <assembly name>[;<assembly name>...]

                           - RESOURCES -
  /win32res:<file>         Specifies Win32 resource file (.res)
  /res[ource]:<info>       Embeds the specified resource
                           <info>: <filename>[,<name>[,public|private]]
  /linkres[ource]:<info>   Links the specified resource to this assembly
                           <info>: <filename>[,<name>[,public|private]]

                           - CODE GENERATION -
  /debug[+|-]              Emit debugging information
  /fast[+|-]               Disable language features to allow better code generation
  /warnaserror[+|-]        Treat warnings as errors
  /w[arn]:<level>          Set warning level (0-4)

                           - MISCELLANEOUS -
  @<filename>              Read response file for more options
  /?                       Display help
  /help                    Display help
  /d[efine]:<symbols>      Define conditional compilation symbol(s)
  /nologo                  Do not display compiler copyright banner
  /print[+|-]              Provide print() function

                           - ADVANCED -
  /codepage:<id>           Use the specified code page ID to open source files
  /lcid:<id>               Use the specified LCID for messages and default code page
  /nostdlib[+|-]           Do not import standard library (mscorlib.dll) and change autoref default to off
  /utf8output[+|-]         Emit compiler output in UTF-8 character encoding
  /versionsafe[+|-]        Specify default for members not marked 'override' or 'hide'

在任何Windows安装中通常会有几个副本,但它们通常不在路径中,所以你必须找到它们。

There are usually a couple of copies lying around on any windows install, but they are not usually in the path, so you have to find them.

编译器能够将javascript文件编译成可在任何安装了.NET的Windows机器上运行的可执行文件。

The compiler is capable of compiling javascript files into executables that can run on any windows machine with .NET installed.

这篇关于JavaScript:适用于Windows的独立编译器或解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆