all repos — py-vite @ a1d2d677f74a6738f57cc8efd0fe4fe5abf2d4c8

the original vite, written in python

feat: create project dirs
icyphox icyph0x@protonmail.com
Fri, 16 Mar 2018 00:33:38 +0530
commit

a1d2d677f74a6738f57cc8efd0fe4fe5abf2d4c8

parent

969c4c0b02dece14b91e6a89cb3429a6c16db595

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

jump to
M vite.pyvite.py

@@ -1,6 +1,12 @@

+""" +Vite - A simple and minimal static site generator. +""" + import markdown2 import sys import argparse +import os +import errno parser = argparse.ArgumentParser(description='A simple and mnml static site generator.') parser.add_argument('action', choices=['new'], help='Create a new project.')

@@ -13,3 +19,8 @@

args = parser.parse_args() project_path = args.path[0] +try: + os.makedirs(project_path) +except OSError as e: + if e.errno != errno.EEXIST + raise