deploy_tsviz.py
def minify(branch, info):
    '''
    Minifies all of the js code under js/ using Google's API and
    returns the minified resulting js code.
    '''
    params = [
    ('compilation_level', 'SIMPLE_OPTIMIZATIONS'),
    ('output_format', 'text'),
    ('output_info', info)
    ]

    url = 'https://bitbucket.org/mhnnunes/tsviz/raw/' + branch + '/'
    #Include DEPENDENCIES
    for r, d, f in os.walk('local_scripts'):
        for f in f:
            if f.endswith(".js"):
                params += [('code_url', url + os.path.join(r, f))]
    # Traverse all of the files underneath the js/ dir
    for root, dirs, files in os.walk('js'):
        for file in files:
            if not ('dev.js' in file):
                params += [('code_url', url + os.path.join(root, file))]

    urlparams = urllib.urlencode(params)
    headers = {'Content-type': 'application/x-www-form-urlencoded'}
    conn = httplib.HTTPConnection('closure-compiler.appspot.com')
    conn.request('POST', '/compile', urlparams, headers)
    response = conn.getresponse()
    data = response.read() 
    conn.close()

    return data

    Minifies all of the js code under js/ using Google's API and
    returns the minified resulting js code.
    
Minifies all of the js code under js/ using Google's API and
returns the minified resulting js code.
Minifies all of the js code under js / using Google ' s API and returns the minified resulting js code .
def minify(branch, info):
    params = [
    ('compilation_level', 'SIMPLE_OPTIMIZATIONS'),
    ('output_format', 'text'),
    ('output_info', info)
    ]
    url = 'https://bitbucket.org/mhnnunes/tsviz/raw/' + branch + '/'
    for r, d, f in os.walk('local_scripts'):
        for f in f:
            if f.endswith(".js"):
                params += [('code_url', url + os.path.join(r, f))]
    for root, dirs, files in os.walk('js'):
        for file in files:
            if not ('dev.js' in file):
                params += [('code_url', url + os.path.join(root, file))]
    urlparams = urllib.urlencode(params)
    headers = {'Content-type': 'application/x-www-form-urlencoded'}
    conn = httplib.HTTPConnection('closure-compiler.appspot.com')
    conn.request('POST', '/compile', urlparams, headers)
    response = conn.getresponse()
    data = response.read() 
    conn.close()
    return data
def minify ( branch , info ) : params = [ ( 'compilation_level' , 'SIMPLE_OPTIMIZATIONS' ) , ( 'output_format' , 'text' ) , ( 'output_info' , info ) ] url = 'https://bitbucket.org/mhnnunes/tsviz/raw/' + branch + '/' for r , d , f in os . walk ( 'local_scripts' ) : for f in f : if f . endswith ( ".js" ) : params += [ ( 'code_url' , url + os . path . join ( r , f ) ) ] for root , dirs , files in os . walk ( 'js' ) : for file in files : if not ( 'dev.js' in file ) : params += [ ( 'code_url' , url + os . path . join ( root , file ) ) ] urlparams = urllib . urlencode ( params ) headers = { 'Content-type' : 'application/x-www-form-urlencoded' } conn = httplib . HTTPConnection ( 'closure-compiler.appspot.com' ) conn . request ( 'POST' , '/compile' , urlparams , headers ) response = conn . getresponse ( ) data = response . read ( ) conn . close ( ) return data
Minifies all of the js code under js/ using Google's API and
returns the minified resulting js code.
Minifies all of the js code under js / using Google ' s API and returns the minified resulting js code .
'''
    Minifies all of the js code under js/ using Google's API and
    returns the minified resulting js code.
    ''' #Include DEPENDENCIES # Traverse all of the files underneath the js/ dir
branch
info