all repos — py-vite @ d56f048e8a7d577f1d49f9d08065cec78b02b104

the original vite, written in python

style: flake8 stuff
Anirudh icyph0x@pm.me
Sun, 15 Apr 2018 22:09:06 +0530
commit

d56f048e8a7d577f1d49f9d08065cec78b02b104

parent

bb05dee2d069b654dced0af1e9bd816a7e5d5904

2 files changed, 6 insertions(+), 5 deletions(-)

jump to
M make.pymake.py

@@ -64,7 +64,7 @@ os.mkdir(html_file)

output = jinja_render(html_text, TEMPL_FILE) with open(os.path.join(html_file, 'index.html'), 'w') as f: f.write(output) - print(run('Rendered %s.' % (page))) + print(run('Rendered %s.' % (page))) def server():

@@ -81,6 +81,7 @@ print(info('Stopping server.'))

httpd.server_close() sys.exit(1) + def main(): if args.serve: server()

@@ -91,10 +92,10 @@ print(info(italic('pages') + ' directory is empty. Nothing to build.'))

sys.exit(1) else: try: - html_gen() - print(good('Done in %0.5fs.' % (time.process_time() - start))) + html_gen() + print(good('Done in %0.5fs.' % (time.process_time() - start))) except jinja2.exceptions.TemplateNotFound: - print(bad('Error: specified template not found: %s' % (TEMPL_FILE))) + print(bad('Error: specified template not found: %s' % TEMPL_FILE)) if __name__ == "__main__":
M vite.pyvite.py

@@ -45,7 +45,6 @@ except FileExistsError:

print(bad('Error: specified path exists.')) - def create_config(path): with open(path + '/config.py', 'w') as f: f.write("""# config.py - Vite's configuration script

@@ -85,6 +84,7 @@

def main(): if args.new: create_project(project_path) + if __name__ == "__main__": main()