typescript plugin for vibe.d diet templates
    via Digitalmars-d-announce 
    digitalmars-d-announce at puremagic.com
       
    Sat Jan 17 05:56:56 PST 2015
    
    
  
On Saturday, 17 January 2015 at 11:26:40 UTC, Mengu wrote:
> a friend of mine liked d so much -you know, after i show off 
> all the kewl features :)- he just built a typescript plugin for 
> vibe.d diet templates. it's a fork of martin's coffeescript 
> plugin.
>
> https://github.com/f/diet-typescript
>
> for the uninformed, typescript is a typed superset of 
> javascript that compiles to plain old javascript. more info can 
> be reached at www.typescriptlang.org.
Nice work, but I have some gripes with it:
First, creating temporary files with predictable names is a bad 
idea, because it opens the door for symlink attacks. 
Unfortunately, I don't know of an alternative way to do this 
safely using only the standard library; it seems, this crucial 
functionality is missing. I've asked here:
http://forum.dlang.org/thread/xliylzcxrsfilmqsncxf@forum.dlang.org
The second thing is that you're using `pipeShell()`, which takes 
only the entire command as a parameter. Because this command will 
be interpreted by the shell, you have to make sure that all 
you're arguments are correctly escaped. However, in your case you 
don't actually need a shell; `pipeProcess()` is a better 
solution, because it takes the argument list as an array:
     auto pipes = pipeProcess(
         ["tsc", inputFileName, "--out", outputFileName],
         Redirect.stderrToStdout | Redirect.stdout
     );
    
    
More information about the Digitalmars-d-announce
mailing list