Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37019da

Browse files
committed
Merge pull request jashkenas#1522 from breckinloggins/fix_1470
Issue jashkenas#1470: Command line compiler now assumes ".coffee" extension if left off of file names
2 parents 8931e31 + 479a2e0 commit 37019da

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

lib/command.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/command.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ compileScripts = ->
8585
total += x for x in unprocessed
8686
total
8787
path.exists source, (exists) ->
88+
if topLevel and not exists and source[-7..] isnt '.coffee'
89+
return compile "#{source}.coffee", sourceIndex, topLevel
90+
8891
throw new Error "File not found: #{source}" if topLevel and not exists
8992
fs.stat source, (err, stats) ->
9093
throw err if err

0 commit comments

Comments
 (0)