all repos — py-vite @ 0265ee95fc048d26f51486866880cd60a70f7461

the original vite, written in python

feat(make.py): add `serve` argument
Anirudh icyph0x@pm.me
Sun, 15 Apr 2018 16:13:35 +0530
commit

0265ee95fc048d26f51486866880cd60a70f7461

parent

9b7ca8070dbe98b914544b321bf27edb199d4bd0

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M make.pymake.py

@@ -4,10 +4,17 @@ import os

import sys import jinja2 import time +import argparse from markdown2 import markdown_path from huepy import * +desc = green('Script to build and serve Vite projects.') +usage = lightblue('make.py') + ' [serve]' +help_txt = 'Serve pages from the ' + italic('build') + ' directory.' +parser = argparse.ArgumentParser(description=desc, usage=usage) +parser.add_argument('serve', nargs='*', help=help_txt) + # import config file try: sys.path.append(os.getcwd())

@@ -15,6 +22,7 @@ import config

except ModuleNotFoundError: print(bad('Error: config.py not found.')) print(que('Are you sure you\'re in a project directory?')) + parser.print_help() sys.exit(1) # constants