creamdog / JurassicCoffee

CoffeeScript Compiler Implementation in .NET
20 stars 4 forks source link

Upgrade to allow both directories and individual files to be specified in a build event #6

Closed biofractal closed 11 years ago

biofractal commented 11 years ago

I found the following problem. When I was including common coffee files into more than one destination coffee file, via the require feature, the common files were presumably being compiled multiple times. To prevent this I wanted to compile my common files just once and include the resultant js into the destination files.

To do this I need to allow the console app to accept both directories and individual files as input. I have therefore made the changes to allow this to happen and everything seems to work fine. Here is an example of a Build Event

CD "$(SolutionDir)Tools\JurassicCoffee" CALL JurassicCoffee.Console.exe "$(ProjectDir)coffee\common\domain.coffee" CALL JurassicCoffee.Console.exe "$(ProjectDir)coffee" -o "$(ProjectDir)js"

I compile the single domain.coffee file (which is just a series of requires off to many other domain files) to js and then include the compiled js in those files that require it.

I have also made some changes to the ReadMe file that gives some explicit Build Events examples.

creamdog commented 11 years ago

sweet!

creamdog commented 11 years ago

merged some stuff