()
Concatenate all files in a single one
Concatenate all files in a single one
Concatenate all files in a single one
def optimize():
  """
  Concatenate all files in a single one
  """

  ccPath = str(globals()["__path__"][0]) + "/../optimizer/closure-compiler"

  # Download Selenium jar
  if not os.path.isfile(ccPath + "/compiler.jar"):
    print "%s: %s" % (fabric.colors.yellow("INFO", True), "You do not have build/optimizer/closure-compiler/compiler.jar, downloading it.")
    with settings(hide("warnings", "running"), warn_only=True):
      local("curl http://closure-compiler.googlecode.com/files/compiler-latest.zip --create-dirs -o %s/latest.zip" % ccPath)
      local("unzip -d %s %s/latest.zip" % (ccPath, ccPath))

  # Run optimizer
  buildPath = str(globals()["__path__"][0]) + "/.."
  local("node %s/optimizer/concat.js build/optimize.js" % buildPath)
def optimize ( ) : ccPath = str ( globals ( ) [ "__path__" ] [ 0 ] ) + "/../optimizer/closure-compiler" # Download Selenium jar if not os . path . isfile ( ccPath + "/compiler.jar" ) : print "%s: %s" % ( fabric . colors . yellow ( "INFO" , True ) , "You do not have build/optimizer/closure-compiler/compiler.jar, downloading it." ) with settings ( hide ( "warnings" , "running" ) , warn_only = True ) : local ( "curl http://closure-compiler.googlecode.com/files/compiler-latest.zip --create-dirs -o %s/latest.zip" % ccPath ) local ( "unzip -d %s %s/latest.zip" % ( ccPath , ccPath ) ) # Run optimizer buildPath = str ( globals ( ) [ "__path__" ] [ 0 ] ) + "/.." local ( "node %s/optimizer/concat.js build/optimize.js" % buildPath )