mirror of
https://github.com/TECHNOFAB11/docsonnet.git
synced 2026-02-02 07:35:11 +01:00
feat: add newSub (#44)
This commit is contained in:
parent
b5a6b0e838
commit
5e45c19fbe
3 changed files with 35 additions and 2 deletions
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue