digital-vcd-render/scripts/vscode-package.py

14 lines
342 B
Python

import os
os.system('npm run build')
for file in os.listdir('dist'):
if file.endswith('.vcd'):
os.remove('dist/' + file)
with open('./dist/index.html', 'r', encoding='utf-8') as fp:
html = fp.read()
html = html.replace("''", "'<workerRoot>'")
with open('./dist/index.html', 'w', encoding='utf-8') as fp:
fp.write(html)