Newer
Older
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
console.log("");
console.log(" .=*#%%#*= -*#%%#*=. =+- ++. .+ .+#%%#+. :++ -+- ");
console.log(":@@=:..:+@@. #@#:..:+@@. *@* @@: -@#@+:..-@@- -@@ *@* ");
console.log("+@* %@= .@@. %@= *@* @@: -@@. *@* -@@ *@* ");
console.log("+@* %@= %@* *%= *@* @@: -@@ *@* -@@ *@* ");
console.log("+@* %@= +@@= *@* @@: -@@ *@* -@@ *@* ");
console.log("+@* %@= .+@@+. *@* @@: -@@ *@* -@@ *@* ");
console.log("+@* %@= .+@@+. *@* @@: -@@ *@* .@@=. :@@= ");
console.log("+@* %@= == +@@: *@* @@: -@@ *@* .+%@@@@%*- ");
console.log("+@* %@= .@@. +@# *@* .@@: -@@ *@* @@- ");
console.log("=@% .@@- @@- #@# +@# :#@@: -@@ *@* @@- ");
console.log(" =%@%##%@%= :#@%##%@@* *@@##@%=:@: :@@ *@+ %@- ");
console.log(" .:.. ..:. ... ");
console.log("");
const command = process.argv[2];
if (command === "watch") {
console.log("watch");
shell.exec("hugo server")
}
if (command === "dev") {
console.log("dev");
shell.exec("hugo");
shell.exec("npx pagefind --site public --output-subdir ../static/pagefind")
shell.exec("hugo server")
}
if (command === "build") {
console.log("build");
shell.exec("hugo");
shell.exec("npm_config_yes=true npx pagefind --site public");
}
if (command === "update") {
console.log("update");
shell.exec("git pull --recurse-submodules --depth 1");
shell.exec("git submodule update --remote");
}
if (command === "setup-example") {
console.log("setup-example");
shell.exec("git submodule add https://github.com/noesya/osuny-example");
}
if (command === "server-example") {
console.log("server-example");
shell.exec("hugo server --config osuny-example/config/example/config.yaml");
}
if (command === "example") {
console.log("example");
shell.exec("yarn setup-example > /dev/null || yarn update");
shell.exec("yarn server-example");
}
if (command === "update-theme") {
console.log("update-theme");
shell.exec("cd themes/osuny-hugo-theme-aaa");
shell.exec("git checkout main");
shell.exec("git pull");
shell.exec("cd ../..");
shell.exec("yarn upgrade");
}