feat(make.py): add `serve` argument
Anirudh icyph0x@pm.me
Sun, 15 Apr 2018 16:13:35 +0530
1 files changed,
8 insertions(+),
0 deletions(-)
jump to
M
make.py
→
make.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