Set paths before creating cache

This commit is contained in:
Kevin Sawicki
2013-11-11 09:24:14 -08:00
parent 78617e31bc
commit 1c4e38c867

View File

@@ -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)