mirror of
https://github.com/atom/atom.git
synced 2026-02-12 23:55:10 -05:00
CoffeeScript compiler is slow. Take steps to avoid it.
This commit is contained in:
@@ -79,8 +79,13 @@ resolve = (file) ->
|
||||
|
||||
if file[0] isnt '/'
|
||||
require.paths.some (path) ->
|
||||
if /\.(.+)$/.test(file) and __exists "#{path}/#{file}"
|
||||
fileExists = /\.(.+)$/.test(file) and __exists "#{path}/#{file}"
|
||||
jsFileExists = not /\.(.+)$/.test(file) and __exists "#{path}/#{file}.js"
|
||||
|
||||
if fileExists
|
||||
file = "#{path}/#{file}"
|
||||
if jsFileExists
|
||||
file = "#{path}/#{file}.js"
|
||||
else if expanded = __expand "#{path}/#{file}"
|
||||
file = expanded
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user