ericmckean / traceur-compiler

Automatically exported from code.google.com/p/traceur-compiler
Apache License 2.0
0 stars 0 forks source link

Offline 'compile' command line feature #90

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently Traceur can be used as a compiler in a web page, compiling to script 
tags marked with its 'type' and loading the results back into the page.

This means Traceur based programs must compile the compiler and take the 
compile overhead hit on every load.

An alternative would be an offline compiler, a command line feature that takes 
ES6 or ES.next source and generates ES5 source. Then the page would have no 
direct Tracuer overhead, neither compiling Traceur itself nor compiling from 
ES6 to ES5.

Input ES6 modules could be concatenated (imported into the root of the 
dependency tree) when producing ES5 output. That is the subject of issue 87.

Original issue reported on code.google.com by johnjbar...@chromium.org on 18 Apr 2012 at 11:10

GoogleCodeExporter commented 9 years ago
We actually have such a compiler already.

http://code.google.com/p/traceur-compiler/source/browse/traceurc
http://code.google.com/p/traceur-compiler/source/browse/src/filecompiler.js

but this one does not "inline" external modules.

Original comment by arv@chromium.org on 18 Apr 2012 at 11:31

GoogleCodeExporter commented 9 years ago
I got an error when compiling a script that referenced the "document" object. 
It seems we can only use this compiler for scripts that do not interact with 
the DOM (i.e. node.js only scripts) Is this the case?

Original comment by kgra...@gmail.com on 24 Sep 2012 at 4:45

GoogleCodeExporter commented 9 years ago
kgraehl: Try turning off the freeVariableChecker option

Original comment by arv@chromium.org on 24 Sep 2012 at 5:10

GoogleCodeExporter commented 9 years ago
./traceur --out out.js [file.js...]

Inlines external modules in files

Original comment by arv@chromium.org on 11 Mar 2013 at 4:36