Commits

Carlos Daniel Ruvalcaba Valenzuela committed 61ce62b

Updated readme, moved version to 0.2

  • Participants
  • Parent commits 44bc72a
  • Tags v0.2

Comments (0)

Files changed (2)

 
 Now you just have to put your .coffee files inside *public/javascript* and they will be served as JavaScript.
 
+
+JavaScript Compression
+----------------------------------
+
+tgext.coffeescript supports javascript output minification via slimit or jsmin as a fallback, this function is
+disabled by default and can be enabled by passing the parameter minify=True on the constructor:
+
+    app = CoffeeScriptMiddleware(app, minify=True)
+
+
+Cache Backends
+----------------------------------
+
+You can change the cache backend storage into any dict like object that can serialize a dict object,
+for example, you can use beaker cache by passing the cache object to the middleware constructor:
+
+    from tgext.coffeescript import CoffeeScriptMiddleware
+    from tg import cache
+
+    make_base_app = base_config.setup_tg_wsgi_app(load_environment)
+
+    def make_app(global_conf, full_stack=True, **app_conf):
+        app = make_base_app(global_conf, full_stack=True, **app_conf)
+
+        # CoffeeScript with beaker cache backend
+        app = CoffeeScriptMiddleware(app, cache=cache)
+
+        return app
+
+
 Compiler options
 ----------------------------------
 
 from setuptools import setup, find_packages
 import sys, os
 
-version = '0.1'
+version = '0.2'
 
 here = os.path.abspath(os.path.dirname(__file__))
 try: