-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate.jl
99 lines (94 loc) · 2.43 KB
/
generate.jl
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using ArgParse
using PkgTemplates
import PkgTemplates: Template
using PkgTemplates: priority, prehook, hook, posthook
include("myplugins.jl")
t_with_jupyter = Template(;
dir = pwd(),
julia = v"1.6.7",
plugins = [
License(; name = "MIT"),
Git(;
ignore = [
"docs/build/",
"docs/site/",
".CondaPkg",
".ipynb_checkpoints",
"*.ipynb",
"*.gif",
".DS_Store",
],
manifest = false,
ssh = true,
),
GitHubActions(; extra_versions = ["1.6", "1", "nightly"]),
Documenter{GitHubActions}(),
Readme(;
inline_badges = true,
badge_order = DataType[GitHubActions, Documenter{GitHubActions}],
),
Dockerfile(with_jupyter = true),
DockerCompose(with_jupyter = true),
Makefile(),
DevContainer(),
Jupytext(:julia),
Jupytext(:python),
JuliaFormatter(),
PlaygroundPluto(),
VSCodeExtensions(),
],
)
t = Template(;
dir = pwd(),
julia = v"1.6.7",
plugins = [
License(; name = "MIT"),
Git(;
ignore = [
"docs/build/",
"docs/site/",
".CondaPkg",
#".ipynb_checkpoints",
#"*.ipynb",
"*.gif",
".DS_Store",
],
manifest = false,
ssh = true,
),
GitHubActions(; extra_versions = ["1.6", "1", "nightly"]),
Documenter{GitHubActions}(),
Readme(;
inline_badges = true,
badge_order = DataType[GitHubActions, Documenter{GitHubActions}],
),
Dockerfile(with_jupyter = false),
DockerCompose(with_jupyter = false),
Makefile(),
JuliaFormatter(),
DevContainer(),
VSCodeExtensions(),
],
)
function main()
s = ArgParseSettings()
@add_arg_table! s begin
"pkgname"
help = "Pkg name"
required = true
"--with-jupyter"
help = "create template for Jupyter workflow"
action = :store_true
end
parsed_args = parse_args(ARGS, s)
pkgname = parsed_args["pkgname"]
if !endswith(pkgname, ".jl")
pkgname *= ".jl"
end
if parsed_args["with-jupyter"]
t_with_jupyter(pkgname)
else
t(pkgname)
end
end
main()