turbo-editors/turbo-moonbitpublic Fork 0
ded61deede2aab942065647372984c8d3179037b
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-moonbit.git
git clone ssh://git@rickub.com/turbo-editors/turbo-moonbit.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

tools.toml.tmpl · 104 lines · 3.5 KBCheetah Blame HistoryRaw
📦 Turbo MoonBit cc1f595 k33g yesterday1# turbo-moonbit tools.
2#
3# Each [[tool]] becomes one line of the MoonBit menu, in the order they appear
4# here. name is what the menu shows; a letter between tildes is its hot key, and
5# no two tools should claim the same one.
6#
7# command goes to "sh -c", so pipes, globs and && work: one entry can be a
8# whole sequence.
9#
10# menu says which menu it appears in. Leave it out and the tool goes into the
11# MoonBit menu; name anything else and that menu is created for you, in the
12# order the names first appear here. A tool that has nothing to do with MoonBit
13# belongs in one of your own:
14#
15# [[tool]]
16# name = "~E~cho"
17# command = "echo TADA"
18# menu = "Tools"
19#
20# A {{label}} in a command is a value the editor asks for before running it, in
21# a box titled after the tool. The text between the braces is what it asks for:
22#
23# [[tool]]
24# name = "~A~dd a dependency"
25# command = "moon add {{module}}"
26#
27# The value is quoted, so a path with a space in it stays one argument. Add ...
28# inside the braces when you mean several arguments rather than one value:
29#
30# [[tool]]
31# name = "Test ~o~ne"
32# command = "moon test {{extra flags...}}"
33#
34# Double braces, not single. Single ones appear in real commands — awk '{print
35# $1}' and find . -exec rm {} + are both ordinary things to put here — and
36# neither is asking you for anything.
37#
38# output says where what the command prints goes:
39# popup a dialog that fills in as it runs, and says the exit code (default)
40# terminal a terminal window, for anything that reads the keyboard or runs long
41# editor an editing window once it has finished, to search with Ctrl-F
42#
43# Commands run in the directory the editor was started in, which is why they
44# see the whole project when you start from its root. moon itself looks upwards
45# for moon.mod, so most of these also work from a package inside the project.
46
47[[tool]]
48name = "~C~heck"
49# The fastest thing that tells you whether the project is sound: it type-checks
50# without emitting object files, which is why it comes first rather than build.
51command = "moon check"
52output = "popup"
53
54[[tool]]
55name = "~F~ormat"
56command = "moon fmt"
57output = "popup"
58
59[[tool]]
60name = "~B~uild"
61# MoonBit compiles to several backends, and which one a project wants is not
62# something a starter file can know. The value is asked for rather than fixed:
63# wasm, wasm-gc, js, native, llvm, or all.
64command = "moon build --target {{backend: wasm-gc, js, native, llvm or all...}}"
65output = "popup"
66
67[[tool]]
68name = "~T~est"
69command = "moon test"
70output = "popup"
71
72[[tool]]
73name = "~R~un"
74command = "moon run {{package, e.g. cmd/main}}"
75# A terminal, not a popup: a program that reads the keyboard has to be able to
76# be answered, and one that runs long has to be able to be interrupted.
77output = "terminal"
78
79[[tool]]
80name = "~A~dd a dependency"
81command = "moon add {{module, e.g. moonbitlang/x}}"
82output = "popup"
83
84[[tool]]
85name = "~I~nterfaces"
86# Regenerates the .mbti files that record each package's public surface. Worth
87# a menu entry because a diff in one is how a review sees that an API changed.
88command = "moon info"
89output = "popup"
90
91[[tool]]
92name = "C~l~ean"
93command = "moon clean"
94output = "popup"
95
96# A tool naming a `menu` gets a menu of its own on the bar. Nothing above does,
97# so every tool above is in the MoonBit menu. This one is in a menu called
98# Tools, which appears between MoonBit and Help — that is the whole mechanism.
99
100[[tool]]
101name = "~E~cho"
102command = "echo 🎉 tada!"
103menu = "Tools"
104output = "terminal"