Closed paganotoni closed 7 years ago
I would also generate a Desc
function as well.
package grifts
import (
. "github.com/markbates/grift/grift"
)
var _ = Desc("task_name", "TODO")
var _ = Add("task_name", func(c *Context) error {
return nil
})
Also, if the task name contains :
we should use Namespace
:
$ buffalo g grift a:b:c
package grifts
import (
. "github.com/markbates/grift/grift"
)
var _ = Namespace("a", func() {
Namespace("b", func() {
Desc("c", "TODO")
Add("c", func(c *Context) error {
return nil
})
})
})
Nice!! i didn't know about namespaces in grift! thanks @markbates
@apaganobeleno that's because it only got merged in today! :) https://github.com/markbates/grift/pull/10
covered in #479
It would be good to have a generator for grift tasks.
CLI:
Would generate:
And contents of the grift task would be something like:
cc @markbates