CoffeeScript is compiled into JavaScript, but it's not a superset of JavaScript, so JavaScript code isn't necessarily valid CoffeeScript code.
Nevertheless, after looking at the source, it looks like Hubot can accept both:
# Public: Loads a file in path.
#
# path - A String path on the filesystem.
# file - A String filename in path on the filesystem.
#
# Returns nothing.
loadFile: (path, file) ->
ext = Path.extname file
full = Path.join path, Path.basename(file, ext)
if ext is '.coffee' or ext is '.js'
try
require(full) @
@parseHelp "#{path}/#{file}"
catch error
@logger.error "Unable to load #{full}: #{error.stack}"
process.exit(1)
This method is called by loadHubotScripts
.