Closed zakdances closed 11 years ago
Just ran grunt-nodemon with the following config pointing at a coffee-script server file:
nodemon: {
prod: {
options: {
file: 'server.coffee'
}
}
}
This is the outputted command in the terminal:
8 Jun 12:49:06 - [nodemon] starting coffee server.coffee
It worked fine for me, so unless you can provide a specific example of how it failed, I will close the issue.
Using the same code as you but with more options. My output:
14:53:38 - [nodemon] starting `node server.coffee`
Wait a minute...one of the options is causing it to fail. I'm testing now...
@ChrisWren If you could, please try with this option:
watchedExtensions: ['coffee']
I believe that is causing the failure. I should add I'm using a Gruntfile.coffee.
Here's my whole grunt-nodemon
block.
nodemon:
dev:
options:
file: 'server.coffee'
watchedExtensions: ['coffee']
watchedFolders: ['/','/public/js']
delayTime: 1
Are you still getting the correct coffee
command with this exact setup?
This is a bug with nodemon, I am looking into a pull request to solve it. You actually don't have to specify .coffee
as an extension as nodemon looks at it by default as seen in this line of the nodemon source. I just updated the README for grunt-nodemon.
@ChrisWren Yup, I just came to the same conclusion after recreating the grunt-nodemon
generated command directly in the terminal.
@ChrisWren any luck with the bugfix?
After further review, I realised that when you use watchedExtensions
and don't specify .coffee or .litcofee, it won't run your server via coffee-script. This seems pretty reasonable as it makes the option more flexible by not using the default file extensions when you want to watch custom extensions. I can't think of a reason for not listing .coffee
files in your watchedExtensions list when running a coffee-script server.
I will update the grunt-nodemon docs to be more explicit about how this works. Thanks for pointing this out!
grunt-nodemon
crashed because it incorrectly tries to start my.coffee
file with the wrong command. Should benot