+ if os.path.islink(path):
+ shutil.copy(path, tmpdir)
+ else:
+ # remove "use strict"; directive
+ with open(path) as inp:
+ dest = pathjoin(tmpdir, os.path.basename(path))
+ with open(dest, "w") as out:
+ for line in inp:
+ sline = line.strip()
+ if sline != '"use strict"' and sline != '"use strict";':
+ out.write(line)