import os

exclude_files = [
    'onedark.css',
    'onelight.css',
    'default-dark.css',
    'default-light.css'
]

exclude_folders = [
    'static'
]

os.system('npm run build')
for file in os.listdir('dist'):
    if file in exclude_files or file.endswith('.json'):
        os.remove('dist/' + file)



with open('./dist/index.html', 'r', encoding='utf-8') as fp:
    html = fp.read()

with open('./dist/index.html', 'w', encoding='utf-8') as fp:
    fp.write(html)