1import os 2 3BUILD_DIR = "build" 4 5for current, dirs, files in os.walk(BUILD_DIR): 6 for file in files: 7 if file.endswith(".map"): 8 # remove the source map 9 os.remove(os.path.join(current, file)) 10 11