Added 7 new sites and general refactoring

This commit is contained in:
2021-09-13 01:36:00 +02:00
parent 4907448aa6
commit b45c1410f2
6 changed files with 82 additions and 18 deletions

11
build.py Executable file → Normal file
View File

@ -55,18 +55,13 @@ def copy_built():
subprocess.call(['tsc', '-p', 'src'])
build_path = Path('build')
if build_path.is_dir():
for file in build_path.rglob('*'):
if file.is_dir():
shutil.rmtree(str(file))
else:
file.unlink()
else:
if not build_path.is_dir():
build_path.mkdir()
for file in Path('src').rglob('*'):
build_file = build_path.joinpath(str(file)[4:])
if file.is_dir():
build_file.mkdir(parents=True)
if not build_file.exists():
build_file.mkdir(parents=True)
elif file.suffix == '.sass':
css_file = str(file)[:-4] + 'css'
subprocess.call(['sass', '--no-source-map', file, css_file])