feat: create project dirs
icyphox icyph0x@protonmail.com
Fri, 16 Mar 2018 00:33:38 +0530
1 files changed,
11 insertions(+),
0 deletions(-)
jump to
M
vite.py
→
vite.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