mrappleton/grunt-coffee-server — pull request #2 by aug-riedinger (2013-02-21 18:03:05+00:00)
Title: Option added : tryCoffeeFirst 

Hello mrappleton,

I really like you grunt coffee server package.
But sometimes, I like to compile the js, to compare it to the coffee, and then I keep working on the coffee file, and nothing updates until I realize I need to delete the js file.

Since this package is for dev mode only, I thought it would be convenient to have the option between :
- Default : try .js file if not found .coffee
- tryCoffeeFirst : try coffee file, if not found .js

the parameter is to be added in the server config of grunt.js
grunt.initConfig({
server: {
port: 5000,
base: './app',
tryCoffeeFirst : true
}
});

I am no expert with modules so I added the parameter in the
module.exports = function readFile(reqPath, tryCoffeeFirst) {
...
}
function.

Maybe there is a cleaner way of doing this. But it works.

Best, and thanks again,

Augustin