feat: create make.py for building project
icyphox icyph0x@protonmail.com
Fri, 16 Mar 2018 09:38:07 +0530
1 files changed,
5 insertions(+),
1 deletions(-)
jump to
M
vite.py
→
vite.py
@@ -24,13 +24,17 @@ try:
abs_path = pathlib.Path(path).resolve() pathlib.Path(path + '/pages').mkdir(parents=True, exist_ok=False) pathlib.Path(path + '/build').mkdir(exist_ok=False) + make_file(path) print('Created project directory at %s.' % (abs_path)) except FileExistsError as e: print('Error: specified path exists.') +def make_file(path): + with open(path + '/make.py', 'w') as f: + f.write('# make.py \n# Auto-generated by Vite.') + def main(): create_dirs(project_path) - if __name__ == "__main__": main()