jashkenas/coffee-script — Issue #2123: Is it possible to add a require('FILE.coffee')?
Author: Deyual
Created: 2012-02-16 17:52:40+00:00
State: open

Is it possible to add a require ('FILE.coffee')?
I try to add the require('coffee-script'), but the file to include not recognize the coffeescript format ... only work if is javascript formatting
for example

file1.coffe ->
require './file2.coffe'

file2.coffe ->
console.log 'hello world!'

to run:
coffee file1.coffe

throws the error

"console.log 'hello world!'
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Unexpected string "

but if it is

file2.coffe ->
console.log('hello world!');

there does not generate any problem