Skip to content

Commit 9c80b6b

Browse files
committed
💥 make a main funtion
1 parent d46b430 commit 9c80b6b

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

make_release/gen-js-ext.nu

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ def gen_keywords [] {
1212
let postamble = ')\\b'
1313
$'"match": "($var_with_dash_or_under_regex)|($preamble)($cmds)($postamble)",'
1414
}
15-
print $"Generating keywords(char nl)"
16-
print (gen_keywords)
17-
print (char nl)
18-
print (char nl)
1915

2016
def gen_sub_keywords [] {
2117
let sub_cmds = (scope commands
@@ -33,9 +29,6 @@ def gen_sub_keywords [] {
3329
} | str join '|')
3430
$'"match": "($preamble)($cmds)($postamble)",'
3531
}
36-
print $"Generating sub keywords(char nl)"
37-
print (gen_sub_keywords)
38-
print (char nl)
3932

4033
def gen_keywords_alphabetically [] {
4134
let alphabet = [a b c d e f g h i j k l m n o p q r s t u v w x y z]
@@ -64,9 +57,6 @@ def gen_keywords_alphabetically [] {
6457
} | str join "\n"
6558
}
6659

67-
print "Generating keywords alphabetically\n"
68-
print (gen_keywords_alphabetically)
69-
print (char nl)
7060

7161
def gen_sub_keywords_alphabetically [] {
7262
let alphabet = [a b c d e f g h i j k l m n o p q r s t u v w x y z]
@@ -96,6 +86,21 @@ def gen_sub_keywords_alphabetically [] {
9686
} | str join "\n"
9787
}
9888

99-
print "Generating sub keywords alphabetically\n"
100-
print (gen_sub_keywords_alphabetically)
101-
print (char nl)
89+
export def main [] {
90+
print $"Generating keywords(char nl)"
91+
print (gen_keywords)
92+
print (char nl)
93+
print (char nl)
94+
95+
print $"Generating sub keywords(char nl)"
96+
print (gen_sub_keywords)
97+
print (char nl)
98+
99+
print "Generating keywords alphabetically\n"
100+
print (gen_keywords_alphabetically)
101+
print (char nl)
102+
103+
print "Generating sub keywords alphabetically\n"
104+
print (gen_sub_keywords_alphabetically)
105+
print (char nl)
106+
}

0 commit comments

Comments
 (0)