all repos — py-vite @ 557b298b5b6efa55c4e4aab239b7681d3617b8c4

the original vite, written in python

refactor: make.py is now symlinked
icyphox icyph0x@protonmail.com
Sat, 17 Mar 2018 14:51:41 +0530
commit

557b298b5b6efa55c4e4aab239b7681d3617b8c4

parent

376a5524c9b6937353660bf4a79c708e3e4c75bf

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M vite.pyvite.py

@@ -7,7 +7,6 @@ import argparse

import errno import pathlib import os -import shutil parser = argparse.ArgumentParser(description='A simple and mnml static site generator.') parser.add_argument('action', choices=['new', 'build'])

@@ -24,10 +23,11 @@

def create_project(path): try: abs_path = pathlib.Path(path).resolve() + 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) - shutil.copy('make.py', 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.')