Live data from Hacker News

Closure Compiler in JavaScript

developers.googleblog.com

111–115 of 115 posts

Re: Closure Compiler in JavaScript

#112

> As this compiler runs in pure JavaScript, the compiler cannot load or save files from your filesystem directly. Why? Node.js has the fs library for that. Why do I have to use gulp?

They also support webpack out of the box. You can most likely add build tools by doing your own integration as well.

Re: Closure Compiler in JavaScript

#113

> As this compiler runs in pure JavaScript, the compiler cannot load or save files from your filesystem directly. Why? Node.js has the fs library for that. Why do I have to use gulp?

They also support webpack out of the box. You can most likely add build tools by doing your own integration as well.

I normally don't use neither. I'm just curious on why they say that.

Would prefer a cli version like browserify. And then integrate it on other tools.

Re: Closure Compiler in JavaScript

#114

This is Google's JavaScript to JavaScript compiler, originally written in Java, but compiled with their Java to JavaScript compiler so that it runs in JavaScript... fair enough...

You forgot to include V8!

Technically, this is the last "JavaScript" in the sentence.

Re: Closure Compiler in JavaScript

#115
post #95
post #64

Earlier quoted context omitted.

What do you mean by Typescript Google closure integration? Typescript understands most of closure comment syntax. They should throw typechecking errors which they currently aren't doing.

TypeScript understands some of the comment syntax, but the type systems are different, the module systems are different, and a ton of other stuff is different. Look through the test cases in https://github.com/angular/tsickle/tree/master/test_files to see the difference between TypeScript-annotated code and Closure-annotated code.

That's a pretty awesome project. Didn't realize something like that existed.

In this case, I think closure should start to understand typescript syntax. Or typescript needs to borrow ideas from closure on minifying and dead code removal.

Post reply on HN