feat: create config.py in project dir
icyphox icyph0x@protonmail.com
Sat, 17 Mar 2018 16:04:58 +0530
M
vite.py
→
vite.py
@@ -27,10 +27,21 @@ cur_path = pathlib.Path('.').resolve()
pathlib.Path(path + '/pages').mkdir(parents=True, exist_ok=False) pathlib.Path(path + '/build').mkdir(exist_ok=False) pathlib.Path(path + '/templates').mkdir(exist_ok=False) + create_config(path) os.symlink(cur_path / 'make.py', abs_path / 'make.py') print('Created project directory at %s.' % (abs_path)) except FileExistsError as e: print('Error: specified path exists.') + +def create_config(path): + with open(path + '/config.py', 'w') as f: + f.write("""# config.py - Vite's configuration script + +title = '' +author = '' +header = '' +footer = '' + """) def build_project(path): try: