This commit is contained in:
Kovid Goyal 2012-03-10 09:26:29 +05:30
parent 35d005f752
commit e7fa8fd894

View File

@ -36,6 +36,15 @@ class JavaScriptLoader(object):
def __init__(self, dynamic_coffeescript=False):
self._dynamic_coffeescript = dynamic_coffeescript
if self._dynamic_coffeescript:
try:
from calibre.utils.serve_coffee import compile_coffeescript
compile_coffeescript
except:
self._dynamic_coffeescript = False
print ('WARNING: Failed to load serve_coffee, not compiling '
'coffeescript dynamically.')
self._cache = {}
self._hp_cache = {}