From 1c4e38c86730a488766d0a2e444d790bf455cfc4 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 11 Nov 2013 09:24:14 -0800 Subject: [PATCH] Set paths before creating cache --- src/less-compile-cache.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)