forked from iffy/nim-argparse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargparse.nimble
More file actions
37 lines (32 loc) · 906 Bytes
/
argparse.nimble
File metadata and controls
37 lines (32 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Package
version = "4.1.2"
author = "Matt Haggard"
description = "A command line argument parser"
license = "MIT"
srcDir = "src"
# Dependencies
requires "nim >= 1.2.18" # tested through to 2.2.6 via choosenim
import std/[sequtils,strutils,strformat]
# nimble builddocs
task builddocs, "Builds the documentation using Nim's docgen":
exec "rm -rf docs/*"
# --outdir is bugged and not working
var cmd = &"""
nim \
--colors:on \
--path:$projectDir \
--docInternal \
--project \
--index:on \
--outdir:docs \
doc \
src/argparse.nim
"""
discard gorgeEx cmd
# first pass for the index
var result = gorgeEx cmd
if result.exitCode != 0:
echo "Documentation generation had some errors;"
# lines with "Error" in them
echo ""
echo result.output.splitLines().filterIt(it.contains "Error").join("\n")