all repos — py-vite @ bb00cc6b86481aa64e553f352264926a32ad8f49

the original vite, written in python

refactor: use shutil.copytree() instead of distutils
Anirudh icyph0x@pm.me
Mon, 18 Jun 2018 22:23:21 +0530
commit

bb00cc6b86481aa64e553f352264926a32ad8f49

parent

85895d803131703500b1e4b0f03b67f4ca4d4c5c

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

jump to
M vite/vite.pyvite/vite.py

@@ -14,7 +14,6 @@ import socketserver

import shutil from markdown2 import markdown_path -from distutils.dir_util import copy_tree from huepy import * from vite import vite

@@ -181,9 +180,8 @@ else:

try: clean() html_gen() - if not os.path.exists(os.path.join(path, BUILD_PATH, 'static')): - os.mkdir(os.path.join(path, BUILD_PATH, 'static')) - copy_tree('static', os.path.join(path, BUILD_PATH, 'static')) + if os.path.exists(os.path.join(PAGES_PATH, 'static')): + shutil.copytree(os.path.join(PAGES_PATH, 'static'), os.path.join(BUILD_PATH)) print(good('Done in %0.5fs.' % (time.process_time() - start))) except jinja2.exceptions.TemplateNotFound: print(bad('Error: specified template not found: %s' % TEMPL_FILE))