all repos — py-vite @ 2396db7c728d9780e1805eeaf7f4b107a8ee58be

the original vite, written in python

feat: QoL changes to argument parsing, version in `__init__.py`
Anirudh icyph0x@pm.me
Thu, 26 Apr 2018 16:32:56 +0530
commit

2396db7c728d9780e1805eeaf7f4b107a8ee58be

parent

945a4c24c740c93c4dd377609588dce7f51d34a0

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

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

@@ -0,0 +1,1 @@

+__version__ = '1.1'
M vite/cli.pyvite/cli.py

@@ -3,15 +3,15 @@ import os

import sys from vite import vite from huepy import * +from vite import __version__ def main(): desc = green('A simple and minimal static site generator.') - usage = lightblue('vite') + ' [new | build | serve]' - # parser = argparse.ArgumentParser(description=desc, usage=usage) - parser = argparse.ArgumentParser() - # help_text = 'Commands to create, build and serve your project.' - sp = parser.add_subparsers(dest='cmd') + usage = lightblue('vite') + ' [options]' + parser = argparse.ArgumentParser(description=desc, usage=usage) + parser.add_argument('-v', '--version', action='version', version='{version}'.format(version=__version__)) + sp = parser.add_subparsers(dest='cmd', help='Options to help create, build and serve your project.') spp = sp.add_parser('new') for cmd in ['build', 'serve']: sp.add_parser(cmd)