Skip to content

Commit

Permalink
some help wordsmithing
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed Jul 10, 2022
1 parent 94a5986 commit bbaed78
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
15 changes: 7 additions & 8 deletions .hof/shadow/Cli/cmd/hof/cmd/gen.go
Expand Up @@ -9,22 +9,21 @@ import (
"github.com/hofstadter-io/hof/cmd/hof/flags"
)

var genLong = `hof gen joins CUE with Go's text/template system and diff3
var genLong = `hof unifies CUE with Go's text/template system and diff3
create on-liners to generate any file from any data
build reusable and modular generators
edit and regenerate those files while keeping changes
If no generator is specified, hof gen runs in adhoc mode.
# Render a template
hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt
hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt
# Add partials to the template context
hof gen data.cue -T template.txt -P partial.txt
hof gen data.cue -T template.txt -P partial.txt
# The template flag as code gen mappings
hof gen data.cue ...
hof gen data.cue -T ...
# Generate multiple templates at once
-T templateA.txt -T templateB.txt
Expand Down Expand Up @@ -65,7 +64,7 @@ hof gen data.cue ...
hof gen app.cue -G frontend -G backend -G migrations
https://docs.hofstadter.io/first-example/
# You can mix adhof with generators by using
# You can mix adhoc with generators by using
# both the -G and -T/-P flags`

func init() {
Expand Down
15 changes: 7 additions & 8 deletions cmd/hof/cmd/gen.go
Expand Up @@ -11,22 +11,21 @@ import (
"github.com/hofstadter-io/hof/lib/gen"
)

var genLong = `hof gen joins CUE with Go's text/template system and diff3
var genLong = `hof unifies CUE with Go's text/template system and diff3
create on-liners to generate any file from any data
build reusable and modular generators
edit and regenerate those files while keeping changes
If no generator is specified, hof gen runs in adhoc mode.
# Render a template
hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt
hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt
# Add partials to the template context
hof gen data.cue -T template.txt -P partial.txt
hof gen data.cue -T template.txt -P partial.txt
# The template flag as code gen mappings
hof gen data.cue ...
hof gen data.cue -T ...
# Generate multiple templates at once
-T templateA.txt -T templateB.txt
Expand Down Expand Up @@ -67,7 +66,7 @@ hof gen data.cue ...
hof gen app.cue -G frontend -G backend -G migrations
https://docs.hofstadter.io/first-example/
# You can mix adhof with generators by using
# You can mix adhoc with generators by using
# both the -G and -T/-P flags`

func init() {
Expand Down
15 changes: 7 additions & 8 deletions design/cli/cmds/gen.cue
Expand Up @@ -96,22 +96,21 @@ import (
}

GenLongHelp: """
hof gen joins CUE with Go's text/template system and diff3
hof unifies CUE with Go's text/template system and diff3
create on-liners to generate any file from any data
build reusable and modular generators
edit and regenerate those files while keeping changes
If no generator is specified, hof gen runs in adhoc mode.
# Render a template
hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt
hof gen data.cue -T template.txt
hof gen data.yaml schema.cue -T template.txt > output.txt
# Add partials to the template context
hof gen data.cue -T template.txt -P partial.txt
hof gen data.cue -T template.txt -P partial.txt
# The template flag as code gen mappings
hof gen data.cue ...
hof gen data.cue -T ...
# Generate multiple templates at once
-T templateA.txt -T templateB.txt
Expand Down Expand Up @@ -152,6 +151,6 @@ hof gen data.cue ...
hof gen app.cue -G frontend -G backend -G migrations
https://docs.hofstadter.io/first-example/
# You can mix adhof with generators by using
# You can mix adhoc with generators by using
# both the -G and -T/-P flags
"""

0 comments on commit bbaed78

Please sign in to comment.