diff --git a/src/less-compile-cache.coffee b/src/less-compile-cache.coffee index 0236cf391..c4c4e0edd 100644 --- a/src/less-compile-cache.coffee +++ b/src/less-compile-cache.coffee @@ -11,18 +11,18 @@ class LessCompileCache @cacheDir: path.join(tmpDir, 'atom-compile-cache', 'less') - constructor: ({resourcePath})-> + constructor: ({resourcePath}) -> + @lessSearchPaths = [ + path.join(resourcePath, 'static', 'variables') + path.join(resourcePath, 'static') + ] + @cache = new LessCache cacheDir: @constructor.cacheDir importPaths: @getImportPaths() resourcePath: window.resourcePath fallbackDir: path.join(resourcePath, 'less-compile-cache') - @lessSearchPaths = [ - path.join(resourcePath, 'static', 'variables') - path.join(resourcePath, 'static') - ] - @subscribe atom.themes, 'reloaded', => @cache.setImportPaths(@getImportPaths()) getImportPaths: -> atom.themes.getImportPaths().concat(@lessSearchPaths)