<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_file(src):
 """ find file in config and output to dest dir """

    #clear the stack between parses
    if config.dest_dir == None:
        dest = src.dir
    else:
        dest = config.dest_dir
    output = get_output(src)
    output_file = dest + '/' + src.basename + '.min.js'
    f = open(output_file,'w')
    f.write(jsmin.jsmin(output))
    f.close()
    print "Wrote combined and minified file to: %s" % (output_file)