mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
add .coffee support to require()
This commit is contained in:
@@ -26,10 +26,12 @@ define = (cb) ->
|
||||
exports
|
||||
|
||||
exts =
|
||||
js: (file) ->
|
||||
code = __read file
|
||||
js: (file, code) ->
|
||||
code or= __read file
|
||||
__jsc__.evalJSString_withScriptPath code, file
|
||||
defines.pop()?.call()
|
||||
coffee: (file) ->
|
||||
exts.js file, CoffeeScript.compile __read file
|
||||
|
||||
resolve = (file) ->
|
||||
if /!/.test file
|
||||
|
||||
Reference in New Issue
Block a user