def preBuild(site):
 optimize = site.config.get('optimize', [])
 if ('js' in optimize):
  site.external_manager.register_optimizer(ClosureJSOptimizer)
 if ('css' in optimize):
  site.external_manager.register_optimizer(YUICSSOptimizer)

def preBuild ( site ) : optimize = site . config . get ( 'optimize' , [ ] ) if ( 'js' in optimize ) : site . external_manager . register_optimizer ( ClosureJSOptimizer ) if ( 'css' in optimize ) : site . external_manager . register_optimizer ( YUICSSOptimizer )
registers optimizers as requested by the configuration .