viatropos/tower — Issue #26: cake coffee -- cant compile template files.
Author: vic
Created: 2012-03-04 15:49:44+00:00
State: open

Hi,

I'm trying to run `cake coffee` on tower root directory. However some .coffee (namely the coffee based templates) cant be compiled as they are actually ejs templates and the compile commands as run by the Cakefile (`coffee = spawn './node_modules/coffee-script/bin/coffee', ['-o', 'lib', '-w', 'src']`) fails for those files with something like:

In src/tower/generator/generators/tower/controller/templates/controller.coffee, reserved word "var" on line 1
In src/tower/generator/generators/tower/helper/templates/helper.coffee, Parse error on line 1: Unexpected 'COMPARE'
In src/tower/generator/generators/tower/mailer/templates/mailer.coffee, Parse error on line 1: Unexpected 'COMPOUND_ASSIGN'
In src/tower/generator/generators/tower/model/templates/model.coffee, reserved word "var" on line 2
In src/tower/generator/generators/tower/view/templates/_form.coffee, reserved word "var" on line 1
In src/tower/generator/generators/tower/view/templates/_item.coffee, reserved word "var" on line 4
In src/tower/generator/generators/tower/view/templates/_list.coffee, Parse error on line 2: Unexpected 'COMPOUND_ASSIGN'
In src/tower/generator/generators/tower/view/templates/_table.coffee, reserved word "var" on line 3
In src/tower/generator/generators/tower/view/templates/show.coffee, reserved word "var" on line 3

How should one go about resolving this, would it be ok to rename all those templates from `.coffee` to `.ejs` so they dont get compiled by the `cake coffee` task?