I’m not 100% what is causing this but something is getting past me with the CoffeeScript compiler (coffee.cmd). I just got node.js and CoffeeScript set up on my Windows machine. If I compile a file like so:
coffee.cmd -c test.coffee
I get test.js out perfectly fine. I have a build script set up in Sublime Text 2 that is generalized so I can build from any directory. When it compiles, it uses the full path of the file, like so:
coffee.cmd -c C:\Users\Spencer\test.coffee
Now, this outputs test.js as expected but for some reason, it also creates an empty ‘-p’ in the same directory. I’m not sure exactly why it’s doing this. Any help would be greatly apprectiated. Thanks!
I’m not certain as I don’t have Windows handy but
command.coffeehas this:And that looks like an excellent candidate for the source of your problem. On a Unixish system (Linux, OSX, FreeBSD, Cygwin, …),
mkdir -pwill create the desired directory and any intermediate directories that are required. I suspect that the standard Windowsmkdirdoesn’t know what-pmeans so it makes two directories instead.You could fix your local version of the CoffeeScript compiler’s source to use the Windows-specific version of
mkdir -por you could try installing Cygwin to get amkdirthat knows what-pmeans. Sending a bug report to the CoffeeScript maintainers would be a nice touch too (but probably not necessary since they’ll find this question on their own).