A mechanism of the CoffeeScript language - javascript

Before using any library, framework etc. in JavaScript, I am interested in it mechanism.
I would like to find out how CoffeeScript works.
My assumption:
1st step: compiler gets string from:
<script type="text/coffeescript"></script>
2nd: it creates a js-code like a string:
it = "test" -> "var it = 'test';"
and the last step compiler uses eval() to implement a code.
P.S.:
Why does it become popular?
It has an influence upon performance, after all we spend a lot of time to execute .coffee files.

The usual approach is to compile CoffeeScript code server-side, and then link JavaScript in your HTML files. This is normally performed using the coffeee command line utility, but you can also find build systems that take care of it for you, such as Grunt, Brunch, etc. You can also write Makefiles or simple shell scripts to take care of this for you.
When using some of the build systems and the coffee tool, you have an option of having the tools monitor your CoffeeScript sources and recompile as soon as you save them. This can be quite handy. Look at the 'watch' feature in the documentation.
My guess for CoffeeScript popularity is that it gives you an arguably nicer syntax. Personally, I find the greatest merit of CoffeeScript is added syntactic sugar like list comprehensions and the fact it treats everything as an expression (e.g., ability to return for loops or if-else blocks from functions). You will also find languages that take this idea even further, like Coco, LiveScript.
One thing to note is that CoffeeScript is not an interpreted language. It's transpiled (compiled into another language) and then executed by the target runtime (JavaScript engine). Because of this, it has the same performance characteristics as equivalent JavaScript code. Whether you can manually write more performant code is another issue. You probably can. At any rate, it's a bit silly to talk about CoffeeScript 'performance'. As for the performance of compiled CoffeeScript, with good knowledge of JavaScript, you can probably optimize here and there, but I haven't had a need to do it ever.

The usual way of using Coffee Script is to compile in as a step in your build process. So you would write Coffee Script, then compile it to plain Javascript, and then use that in your web app.
This carries no runtime cost, because browser will load only Javascript, i.e.:
<script type="text/javascript" src="compiled-js-file.js"></script>
You can use coffee command directly to compile, or some more fancy build systems such as Gulp or Grunt.
You can see Coffe Script website to see what features it has (this is what attracts developers). Most useful, in my opinion, are:
array syntax for functions (JS will support it in ES6)
existential operator to protect you from null value errors
classes (also present in ES6)
destructuring assignment
Also, this means then when you are debugging such a webapp, you will not be able to see where exactly the error is (or setup break points in coffee sources). Fortunately, we have source maps for exactly that problem.

Related

Can you compile JS code using V8 and feed that directly to Chrome?

I'm looking for a way to protect some javascript code from reading/modifying. I know many people consider that impossible, but still...
From what I see the Chrome's V8 engine does a number of optimizations when it sees JS code, probably compiles it (?) and then runs it.
So I'm wondering is it possible to use V8's C++ api to compile the JS code into machinecode/chromecode and then feed that directly into Chrome (I don't care about other browsers)?
Supposedly it will not only be faster, but also non-humanly readable, something like ASM.
Is this possible?
WebAssembly is doing this thing so I don't understand why we can't do it with JS code.
There's also EncloseJS and pkg that are doing a very similar thing.
V8 developer here. No, it is not possible to compile JavaScript ahead of time and send only the compiled code to the browser. V8 (and other virtual machines like it) contain compilers, but they cannot be used as standalone compilers to produce standalone binaries.
In theory, you could compile JavaScript to WebAssembly -- any two turing-complete programming languages can in theory be compiled to each other. As far as I know, no such compiler exists today though. One big reason for that is that performance of the end result would be horrible (see the discussion with Andreas Rossberg for details); so considering that browsers can execute JavaScript directly, people have little reason to develop such a thing. (It would also be a large and difficult task.)
As for your stated goal: your best shot at making JavaScript code unreadable is to minify it. In fact, that is effectively just as good as your idea to generate assembly, because disassemblers exist that turn assembly back into minified-like higher-level language code; they cannot reconstruct variable names or comments (because that information is lost during compilation), but they can reconstruct program logic.
What I ended up doing is moving some of the logic from JavaScript into C++ and compiling that into NodeJS native modules (that's possible for Electron apps).
It works pretty good, it's very fast, the source is... as protected as it can get, but you may need to worry about cross-platform issues, also compiling/linking can be a bit of a pain, but other than that it's great.
WebAssembly is not doing that. And no, it's not possible either. The web is supposed to be both browser- and hardware-independent.
Moreover, a language like JS would not be faster if compiled offline -- it only is anything close to fast because it is dynamically compiled and optimised, taking dynamic profile information into account.

What do those javascript front-end build tools mean when they say "compile" my js codes?

I saw those javascript front-end build tools, e.g. webpack, using the word "compile" from time to time. I am not sure what does compile javascript codes mean exactly, at least not like compile c/c++ codes.
I think I understand the "build" process in general, like bundle all js codes into one big file, minify/uglify the codes, using babel to transforms ES6 syntax(transpile). But what does compiling mean here, how does it fit in the whole building process or it is just another name for the whole build process?
Currently, I thought it may be just another name for using Babel to transforms ES6 syntax.
PS. after reading this SO Is Babel a compiler or transpiler? I believe my question is not same as that. Because it is not just related to Bable. For example, webpack also uses the term compiler https://webpack.js.org/api/compiler/ I do not understand its meaning there!
Browserify uses compiler as well e.g, https://github.com/robrichard/browserify-compile-templates "Compiles underscore templates from HTML script tags into CommonJS in a browserify transform"
It's better to describe the process as "transpilation."
Javascript always executes in a specific environment: in Chrome and Electron, it's the V8 engine; in Firefox, it's SpiderMonkey; etc. Each of these engines supports a specific set of language features and not others. As an example, some engines only support var and do not support const or let. Some support async/await, and others only support Promise.
But web developers know about these other features, and they want to use them, even when they're writing for an engine that doesn't support those features. Why? Most new language features are designed with the goal of making it possible to express complicated concepts in simpler and cleaner ways. This is extremely important, because the number one job of code is to make its purpose clear.
Thus, most language features are essentially syntactic sugar for existing functionality. In those cases, it's always possible to express a routine using both new and old syntax. This is a logical necessity.
A transpiler like Babel can read a script written using advanced syntax, and then re-express the script using a restricted set of language features. Relying on an intermediate representation called an abstract syntax tree, it can produce code that is guaranteed to be functionally equivalent, even though it does the work using very different, more widely-supported control structures.
Perhaps we web developers have gotten lazy in our terminology. When we talk of "compiling" javascript, we aren't usually talking about converting the script to something like bytecode. We're talking about transpilation.
Other kinds of build tasks are also becoming quite common. These days, the front-end is obsessed with a million flavors of "templating," because it's extremely tedious and confusing to describe DOM changes using pure javascript, and because application complexity is increasingly very rapidly. Some frameworks require you to convert source code to other intermediary forms that are later consumed by the web application at runtime. Others permit devs to describe UI using invented syntaxes that no browser is even attempting to support natively. Which tasks are needed varies by application depending on which frameworks are being used, the particulars of the application architecture, and the contours of the deployment environment, and that's just a start.
At its foundation, a web page is built using HTML, CSS, and javascript. That much hasn't changed. But today, most serious applications are built almost entirely in javascript (or something very much like it) and sass. Building the application is the process of applying a set of transformations to the source code to yield the final artifacts in those three bedrock languages.
We lump all that stuff under the term "compile."
You pretty much hit the nail on the head. When the Compile (or more appropriately transpilation) operation happens on a JavaScript project it can mean a number of things. As you mentioned these could range from minification, applying polyfills, shims, or the literal act of "compiling" the scripts into a single bundle file for platform/browser consumption.
Transpilation when using super sets of the JavaScript language such as TypeScript, ActionScript, or UnityScript describes the process of converting the source x-script back into native JavaScript which can be in turn be interpreted by a browser (since the browser doesn't recognize the superset languages).
However you are absolutely correct. We aren't compiling our JavaScript into binary, but the term gets thrown around a lot which can lead to confusion. All that said, we are closing in on the age of adoption of WebAssembly and ASMJs which promises to bring the age of bytecode running in the browser which will bring about some interesting possibilities, but alas... That's a story for another day ;)
You're right when you say these front-end Javascript tools don't use the word compile in same context in what your used to with build tools for languages like C/C++. C/C++ compilers turn source code into machine code.
These JavaScript build tools-- like Webpack-- use the word compile in a sense thats more metaphorical than conventional.
When web build tools use the word compile, they're using it in the sense that they are transpiling, minifying (a.k.a uglyfying), and bundling the source files so they are better optimized for client browsers and network requests. (Smaller file sizes, better browser compatibility, less HTTP requests from bundled assets, etc.)

What does the angular compiler "compile"?

I was asked that today and was not able to give a proper answer.
Typescript transpiles to JS. Then there is tree shaking, "less" (optional) and what else in the process of making a deployment. But nothing like that (afaik) has anything to do with "compiling". Everything gets bundled and heavily optimized, but it's not actually compiled, right?
There is even an "ahead of time"-compiler, which really does a noticeable job. What do I miss?
Javascript itself is still interpreted, right?
You're presuming compiling means taking the source code and producing machine code, low-level codes, etc. But compiling actually just means taking one source code and turning it into another. So it seems reasonable to say that taking Typescript and producing JavaScript is a form of compiling. It's not dissimilar to what (for example) c# does when its compiled into IL language.
That said, I'd say a better word for this is Transpiling. I'd suggest that the Typescript compiler is better described as a Transpiler.
The difference is subtle and a transpiler can be thought of as a type of compiler; but a (pure)compiled language is (usually) turning a high-level language to a low(er) level language (nearer to machine code), like the C# example. A transpiler turns a high-level language into a similar level (of abstraction) language (also high level).*
The result of the compiled code is typically not a language that you would write yourself. The result of a transpiler is another high-level language. In theory, you could write IL (as an example) but it's really designed to be produced by a compiler and there are no tools or support for doing this, you produce IL by compiling C#/vb.net, only. Whereas Javascript is a usable (and used) programming language in its own right.
*Lots of caveats as the definitions of these words and their usage are pretty vague
You seem to be asking three questions in one:
What is the difference between a compiler and a transpiler?
Do Angular and TypeScript implement compilers or transpilers?
Is there a separate Angular compiler? What does it compile?
What is the difference between a compiler and transpiler?
#JörgWMittag provided a very good answer to this question.
Do Angular and TypeScript implement compilers or transpilers?
Both TS and Angular implement real compilers. They follow the same stages of lexical analysis, parsing, semantic analysis, and code generation as C/C++ compilers that produce assembly code (except probably for optimization). You can see that the class/folder are named "compiler" in both Angular and TS.
The angular compiler is not really related to TypeScript compiler. These are very different compilers.
Is there a separate Angular compiler? What does it compile?
Angular has two compilers:
View Compiler
Module Compiler
The job of the view compiler is to transform the template you specify for the component template into the internal representation of a component which is a view factory that is then used to instantiate a view instance.
Besides transforming the template, the view compiler also compiles various metadata information in the form of decorators like #HostBinding, #ViewChild etc.
Suppose you define a component and its template like this:
#Component({
selector: 'a-comp',
template: '<span>A Component</span>'
})
class AComponent {}
Using this data the compiler generates the following slightly simplified component factory:
function View_AComponent {
return jit_viewDef1(0,[
elementDef2(0,null,null,1,'span',...),
jit_textDef3(null,['My name is ',...])
]
It describes the structure of a component view and is used when instantiating the component. The first node is element definition and the second one is text definition. You can see that each node gets the information it needs when being instantiated through parameters list. It’s a job of a compiler to resolve all the required dependencies and provide them at the runtime.
I strongly recommend reading these articles:
Here is what you need to know about dynamic components in Angular
Here is why you will not find components inside Angular
Also, see the answer to What is the difference between Angular AOT and JIT compiler.
The job of the module compiler is to create a module factory which basically contains merged definitions of the providers.
For more information, read:
Avoiding common confusions with modules in Angular
Typescript transpires to JS. Then there is tree shaking, "less" (optional) and what else in the process of making a deployment. But nothing like that (afaik) has anything to do with "compiling". Everything gets bundled and heavily optimized, but it's not actually compiled, right?
Compilation means transforming a program written in a language A into a semantically equivalent program written in language B such that evaluating the compiled program according to the rules of language B (for example interpreting it with an interpreter for B) yields the same result and has the same side-effects as evaluating the original program according to the rules of language A (for example interpreting it with an interpreter for A).
Compilation simply means translating a program from language A to language B. That's all it means. (Also note that it is perfectly possible for A and B to be the same language.)
In some cases, we have more specialized names for certain kinds of compilers, depending on what A and B are, and what the compiler does:
if A is perceived to be assembly language and B is perceived to be machine language, then we call it an assembler,
if A is perceived to be machine language and B is perceived to be assembly language, then we call it a disassembler,
if A is perceived to be lower-level than B, then we call it a decompiler,
if A and B are the same language, and the resulting program is in some way faster or lighter, then we call it an optimizer,
if A and B are the same languages, and the resulting program is smaller, then we call it a minifier,
if A and B are the same languages, and the resulting program is less readable, then we call it an obfuscator,
if A and B are perceived to be at roughly the same level of abstraction, then we call it a transpiler, and
if A and B are perceived to be at roughly the same level of abstraction and the resulting program preserves formatting, comments, and programmer intent such that it is possible to maintain the resulting the program in the same fashion as the original program, then we call it a re-engineering tool.
Also, note that older sources may use the terms "translation" and "translator" instead of "compilation" and "compiler". For example, C talks about "translation units".
You may also stumble across the term "language processor". This can mean either a compiler, an interpreter, or both compilers and interpreters depending on the definition.
Javascript itself is still interpreted, right?
JavaScript is a language. Languages are a set of logical rules and restrictions. Languages aren't interpreted or compiled. Languages just are.
Compilation and interpretation are traits of a compiler or interpreter (duh!). Every language can be implemented with a compiler and every language can be implemented with an interpreter. Many languages have both compilers and interpreters. Many modern high-performance execution engines have both at least one compiler and at least one interpreter.
These two terms belong on different layers of abstraction. If English were a typed language, "interpreted-language" would be a type error.
Note also that some languages have neither an interpreter nor a compiler. There are languages which have no implementation at all. Still, they are languages, and you can write programs in them. You just can't run them.
Also, note that everything is interpreted at some point: if you want to execute something, you must interpret it. Compilation just translates code from one language to another. It doesn't run it. Interpretation runs it. (Sometimes, when an interpreter is implemented in hardware, we call it a "CPU", but it's still an interpreter.)
Case in point: every single currently existing mainstream JavaScript implementation has a compiler.
V8 started out as a pure compiler: it compiled JavaScript straight to moderately optimized native machine code. Later, a second compiler was added. Now, there are two compilers: a lightweight compiler that produces moderately optimized code but the compiler itself is very fast and uses little RAM. This compiler also injects profiling code into the compiled code. The second compiler is a more heavyweight, slower, more expensive compiler, which, however, produces much tighter, much faster code. It also uses the results of the profiling code injected by the first compiler to make dynamic optimization decisions. Also, the decision which code to re-compile using the second compiler is made based on that profiling information. Note that at no time there is an interpreter involved. V8 never interprets, it always compiles. It doesn't even contain an interpreter. (Actually, I believe nowadays it does, I am describing the first two iterations.)
SpiderMonkey compiles JavaScript to SpiderMonkey bytecode, which it then interprets. The interpreter also profiles the code, and then the code which gets executed most often is compiled by a compiler to native machine code. So, SpiderMonkey contains two compilers: one from JavaScript to SpiderMonkey bytecode, and another from SpiderMonkey bytecode to native machine code.
Almost all JavaScript execution engines (with the exception of V8) follow this model of an AOT compiler that compiles JavaScript to bytecode, and a mixed-mode engine that switches between interpreting and compiling that bytecode.
You wrote in a comment:
I really was thinking that machine code is somewhere involved.
What does "machine code" even mean?
What is one man's machine language is another man's intermediate language and vice versa? For example, there are CPUs which can natively execute JVM bytecode, on such a CPU, JVM bytecode is native machine code. And there are interpreters for x86 machine code, when you run of those x86 machine code is interpreted bytecode.
There is an x86 interpreter called JPC written in Java. If I run x86 machine code on JPC running on a native JVM CPU … which is the bytecode and which is the native code? If I compile x86 machine code to JavaScript (yes, there are tools which can do that) and run it in a browser on my phone (which has an ARM CPU), which is the bytecode and which is the native machine code? What if the program I am compiling is a SPARC emulator, and I use it to run SPARC code?
Note that every language induces an abstract machine, and is machine language for that machine. So, every language (including very high-level languages) is native machine code. Also, you can write an interpreter for every language. So, every language (including x86 machine code) is not-native.
Getting the code you've written to run on a browser involves two things:
1) Transpiling the Typescript into JavaScript. This is kind of a solved problem. I think they just use webpack.
2) Compiling the angular abstractions into JavaScript. I mean things like a components, pipes, directives, templates etc. This is what the angular core team work on.
In case you're really interested in that second bit, the angular compiler, watch compiler author Tobias Bosch explain the Angular Compiler at AngularConnect 2016.
I think there's a bit of confusion going on here between transpiling and compilation. It sort of doesn't matter and is a matter of personal taste, they're both just transforms between representations of code. But the definition I personally use is that transpilation is between two different languages at a similar abstraction level (eg typescript to javascript), whereas compilation requires a step down in level of abstraction. I think from templates, components, pipes, directives etc to just javascript is a step down the abstraction ladder, and that's why it's called a compiler.
Angular Compiler
One of the most important changes from Angular 4 to 5 is that the compiler has been rewritten be faster and more thorough. In the past, Angular applications used what we call Just-in-Time (JIT) compilation, where the application was compiled at runtime in the browser before running. The compiler updates in Angular 5 advanced the move to AOT, which made the app run faster as it performes less compilation when running the app. AOT become enabled by default in any production build since the 1.5 version of the Angular CLI.
Let's say we want to build an application for deployment and run the following command:
ng build --prod
A few things happen: production version, minification, bunddles assets, filename hashing, tree shaking, AOT ... (we can enable/disable this using flags, ex. aot=false). In short, the prod flag creates an optimized bundle of the application by doing AOT compilation using the ngc (the Angular compiler) to create optimized code ready for the browser (Yes, it pre-compiles templates).
TypeScript Compiler
The TypeScript compiler, tsc, is responsible for compiling TypeScript files. It is the compiler that is responsible for implementing TypeScript features, such as static types, and the result is pure JavaScript from which the TypeScript keywords and expressions have been removed.
The TypeScript compiler has two main features: it is a transpiler and a type checker. The compiler transpiles TypeScript to JavaScript. It does the following transformations on your source code:
Remove all type annotations.
Compile new JavaScript features for old versions of JavaScript.
Compile TypeScript features that are not standard JavaScript.
Invoking it, the compiler searches for configurations loaded in tsconfig.json (A detailed list of all the compiler options, along with default values, can be found here).
In most respects, the TypeScript compiler works like any compiler. But there is one difference that can catch out the unwary: by default, the compiler continues to emit JavaScript code even when it encounters an error. Fortunately, this behavior can be disabled by setting the noEmitOnError configuration setting to true in the tsconfig.json file.
To note: tsc and ngc have different purposes and it's not about selecting one over the other. This answer might be of interest.
This answer was crafted based on the content from the following books
Cloe, M. (2018). "Angular 5 Projects: Learn to Build Single Page Web Applications Using 70+ Projects".
Dewey, B., Grossnicklaus, K., Japikse, P. (2017). "Building Web Applications with Visual Studio 2017: Using .NET Core and Modern JavaScript Frameworks".
Freeman, A. (2019). "Essential TypeScript: From Beginner to Pro".
Ghiya, P. (2018). "TypeScript Microservices".
Iskandar, A., Chivukulu, S. (2019). "Web Development with Angular and Bootstrap - Third Edition".
Hennessy, K., Arora, C. (2018). "Angular 6 by Example".
Jansen, R., Wolf, I., Vane, V. (2016). "TypeScript: Modern JavaScript Development".
Mohammed, Z. (2019). "Angular Projects".
Seshadri, S. (2018). "Angular: Up and Running".
Wilken, J. (2018). "Angular in Action".

What compilers target JavaScript runtimes?

I am using GWT, which includes a Java-to-JavaScript compiler. Before this project, targeting the JavaScript runtime from a different language hadn't occurred to me, and I'm enjoying the GWT experience.
A quick search revealed Java2Script as another Java-to-JavaScript solution. Are there any other mature compilers that target the JavaScript runtime?
List of languages that compile to JS
You also have Haxe. It features static, structural, strong and inferred typing; algebraic data types; lambda expressions with closure support; a module system and can compile not only to JavaScript but also Flash, C++, Neko, PHP. Java support is under development too.
Pyjamas compiles Python to JavaScript.
HotRuby runs Ruby source code under JavaScript and Flash.
Orto is (was?) a JVM implemented in JavaScript. (Original site is down; link is to a blog entry.)
The ZK framework, which likes to compare themselves favorably against GWT, uses Java and XML to generate JavaScript. (They claim that it takes far less code than GWT to do the same stuff.)
And I have heard it well-argued that jQuery is a separate language that happens to be implemented in, and run under, JavaScript. :-)
OpenLaszlo is on open source XML -> Javascript (technically DHTML, also can compile to Flash) compiler. I've played with it a little bit and it seemed interesting, although have never used it seriously (bad IDE support when I tried it).
Objective-j is a similar project that resembles objective-c, although runs as javascript (not sure if it compiles it or has a js interpreter). I don't know much about it, but do see posts about it on the Ajaxian from time to time.
Parenscript is "a translator from a small Lispy language to JavaScript". It's not Common Lisp -- it's mostly just Lisp syntax for Javascript, though for simple things you can write the same code to target both, if you're careful. I'm not sure I'd call it "mature", either.
While there are other products which compile to javascript (noted in the other comments), I believe that GWT is, by far, the most mature one out there, in terms of real-world usage.
The simple fact that a number of Google's core applications use GWT (e.g.: the new adwords GUI, Google wave, etc) means you can have confidence the product is going to be maintained for at least the next few years, it isn't just going to fade away anytime soon.
Another thing to keep in mind is that GWT is far more than a java-to-javascript compiler, it also is an optimizing compiler, it has hosted mode, it is fully interoperable with native javascript, it does image bundling, it does code spliting in the new version, etc.
Script #
JSC
cappuccino (sort of)
The inventors of Clojure (a JVM based Lisp dialect) launched ClojureScript in mid-2011. ClojureScript compiles Clojure source code into JavaScript, making use of the Google Closure compiler and the Closure framework. ClojureScript code can run both in the browser client, or on node.js servers.
Here's a shameless plug for a project I started and am continuing to develop: scxml-js, a Statecharts-to-JavaScript compiler

Pre-Compile JavaScript from VS2008 IDE

Is there a way for me to pre-compile my JS code when building my solution? I would like to be made aware of common problems before I get to the browser. Ideally I would build the sln and, if necessary, have a plugin or call from the build events examine the js code against a Java compiler.
Thank you very much in advance!
Despite what many of the other posters have said, in many cases (incl. the Mozilla Spidermonkey engine found in the Firefox browser) Javascript is in fact compiled into bytecodes, vaguely similar to (but not compatible with) the ones used in Java. You just don't see the compiler's output because it is never available to you, only to the Javascript bytecode interpreter. It's also not possible to save the compiled bytecodes for reuse (at least in the web browser context; in alternate uses of the Spidermonkey engine I do think it is possible to save the compiled bytecodes in memory for reuse, but not in a form that can be saved to disk for another future use), as far as I know.
I use a Javascript shell JSDB which also uses the Spidermonkey engine; when you load in a file, it will complain about syntax errors before it runs even one line of code. This is not the same type of compilation as Java, though; Javascript is a loosely-typed language and so it won't catch problems the way a Java compiler would (e.g. complain about every last thing under the sun that it knows you haven't done right).
Having said that, I would second JSLint as it would probably catch many of your errors.
As a side note, the Rhino project lets you compile Javascript into Java classes; i've never tried this but it sounds interesting.
Javascript is an interpreted language, it's not compiled till runtime. Also, javascript has very, very little to do with Java. Netscape released JavaScript around the same time Sun released Java, and there was some sort of marketing deal between them. Otherwise, they're unrelated.
I apologize for my misuse of the term 'compile'. I do fully understand the difference between compiled and interpreted languages. What I am interested in is to have my syntax checked routinely during a build so typos, invalid method calls and the like are flagged. I'm going to look into what Jason S recommended for this. I am also fully aware that JavaScript is not Java, but have read before that you could run your JS code through a Java Compiler for syntax checking. I was hoping to find something better integrated with VS.
Thank you very much to everyone understanding the intent of my request.
Javascript isn't compiled, has nothing to do with Java but some shared syntax, and is best tested by loading your app into a browser.
There are some JS testing frameworks/tools available but I couldn't recommend any of them myself.
Try JSLint.VS

Categories

Resources