4 ms·
>In-memory compilation already exists. Well, it seems that it requires quite a lot of code. Perhaps you should publish the gulp wrapper as a Gulp plugin. By t
by nawitus 12y ago
>In-memory compilation already exists.
Well, it seems that it requires quite a lot of code. Perhaps you should publish the gulp wrapper as a Gulp plugin.
By the way, does your Gulp wrapper load files from the disk, or are the files given to it as in-memory streams? That's what I mean by "in-memory compilation".
- Arnavion 12y ago>does your Gulp wrapper load files from the disk, or are the files given to it as in-memory streams The latter. The TS compiler (TypeScriptCompiler) internally works with string sources and outputs strings. The official sources use a wrapper around it (BatchCompiler) that converts input file names to input file contents and output JS+sourcemaps to files. My wrapper uses file contents from gulp.src for the same. >Well, it seems that it requires quite a lot of code Yes. The first part of my code is basically a reimplementation of BatchCompiler. But my code also does other things - for example I fiddle with the AST to generate automatic JSDocs, etc.