all repos — py-vite @ 643c495802c137cdafcd871814003a0da5e188bb

the original vite, written in python

feat(make.py): add timer
icyphox icyph0x@protonmail.com
Sun, 18 Mar 2018 11:31:55 +0530
commit

643c495802c137cdafcd871814003a0da5e188bb

parent

4eda54f6c1361ddb9049d3370b8a0881f343277d

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

jump to
M make.pymake.py

@@ -2,6 +2,7 @@ from markdown2 import markdown_path

import os import sys import jinja2 +import time # import config file try:

@@ -35,6 +36,7 @@ return html_text

def main(): + start = time.process_time() template_file = TEMPL_PATH + '/index.html' for page in os.listdir(PAGES_PATH): html_text = markdown_render(page)

@@ -45,7 +47,8 @@ output = jinja_render(html_text, template_file)

with open(os.path.join(html_path, 'index.html'), 'w') as f: f.write(output) print('Rendered %s' % (page)) - + print('Done in %0.5fs' % (time.process_time() - start)) + if __name__ == "__main__": main()