feat: add newSub (#44)

This commit is contained in:
Jeroen Op 't Eynde 2023-02-16 19:56:58 +01:00 committed by GitHub
parent b5a6b0e838
commit 5e45c19fbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 2 deletions

View file

@ -49,6 +49,23 @@
'local %(name)s = import "%(import)s"'
),
'#newSub':: d.fn(|||
`newSub` creates a package without the preconfigured install/usage templates.
Arguments:
* given `name`
* `help` text
|||, [
d.arg('name', d.T.string),
d.arg('help', d.T.string),
]),
newSub(name, help)::
{
name: name,
help: help,
},
withUsageTemplate(template):: {
usageTemplate: template,
},