mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
CoffeeScript compiler is slow. Take steps to avoid it.
This commit is contained in:
4
Rakefile
4
Rakefile
@@ -8,7 +8,7 @@ task :build do
|
||||
|
||||
dest = File.join(built_dir, contents_dir, "Resources")
|
||||
|
||||
%w(index.html src docs static extensions vendor ).each do |dir|
|
||||
%w(index.html src docs static extensions vendor spec).each do |dir|
|
||||
rm_rf File.join(dest, dir)
|
||||
cp_r dir, File.join(dest, dir)
|
||||
end
|
||||
@@ -19,7 +19,7 @@ task :build do
|
||||
"http://coffeescript.org/ - (try `npm i -g coffee-script`)"
|
||||
end
|
||||
|
||||
sh "coffee -c #{dest}/src/stdlib/require.coffee"
|
||||
sh "coffee -c #{dest}/src #{dest}/vendor #{dest}/extensions #{dest}/spec"
|
||||
end
|
||||
|
||||
desc "Install the app in /Applications"
|
||||
|
||||
@@ -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