-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: reorg references into relevant sections; add #hof & @attrs page
- Loading branch information
Tony Worm
committed
May 19, 2024
1 parent
42d4ac0
commit 5359081
Showing
45 changed files
with
191 additions
and
599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
Title: Ad-hoc Code Gen | ||
|
||
draft: true | ||
weight: 59 | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,44 @@ To further your CUE knowledge, be sure to check out these resources: | |
|
||
- [CUE documentation](https://cuelang.org) (from the CUE Team) | ||
- [Cuetorials](https://cuetorials.com) (by Hofstadter) | ||
|
||
|
||
### Hof & CUE Modules | ||
|
||
__hof__ has a preview version for __CUE modules__. | ||
Hof & CUE's modules serve the same purpose as other languages, | ||
allowing to to version, share, and reuse code. | ||
CUE's module system is still largely experimental. | ||
We will eventually migrate over once sufficient features | ||
are in place, at which point we will provide automation to update. | ||
|
||
Most of hof's features can be used from the module system. | ||
"`hof mod`" is the subcommand for working with modules and dependencies. | ||
The implementation is based on Go modules. | ||
|
||
The name of a module should be the same the git repository. | ||
`hof` talks directly to git repositories and many of | ||
`hof`'s commands will accept modules as an input argument too. | ||
There is also support for OCI based repositories. | ||
|
||
##### [To learn more, see the modules section](/modules/). | ||
|
||
<br> | ||
|
||
{{<codeInner>}} | ||
# create a new module | ||
hof mod init github.com/hofstadter-io/example | ||
|
||
# add a dependency | ||
hof mod get github.com/hofstadter-io/[email protected] | ||
or | ||
hof mod get github.com/hofstadter-io/hof@latest | ||
|
||
# tidy dependencies | ||
hof mod tidy | ||
|
||
# fetch dependencies | ||
hof mod link | ||
or | ||
hof mod vendor | ||
{{</codeInner>}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: "#hof & @attributes" | ||
|
||
weight: 70 | ||
--- | ||
|
||
{{<lead>}} | ||
Hof denotes major features with a `#hof` definition | ||
and has several attributes you can use as shorthand. | ||
{{</lead>}} | ||
|
||
- @gen | ||
- @flow | ||
- @datamodel | ||
|
||
{{< codePane title="hof/schema.Hof" file="code/hof-schemas/hof.html" >}} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.