Schema: introduce CLI command to convert all CUE files to TS (#39694)

* First pass at cuetsify command

* Update go deps

* Small tweaks to input cue files

* Correct ts import structure, whitespace

* Latest version of cuetsy

* add ordinal option

* upate cue file

* Fix merge garbage

* Remove dead code

* Revert "upate cue file"

This reverts commit e40b1df83ebf153f6ff9f61e41d5dbbcb381fb19.

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
sam boyer
2021-09-29 04:59:05 -04:00
committed by GitHub
parent 4263357bbc
commit c786d22705
10 changed files with 362 additions and 58 deletions

View File

@ -169,6 +169,19 @@ so must be recompiled to validate newly-added CUE files.`,
},
},
},
{
Name: "gen-ts",
Usage: "generate TypeScript from all known CUE file types",
Description: `gen-ts generates TypeScript from all CUE files at
expected positions in the filesystem tree of a Grafana repository.`,
Action: runCueCommand(cmd.generateTypescript),
Flags: []cli.Flag{
&cli.StringFlag{
Name: "grafana-root",
Usage: "path to the root of a Grafana repository in which to generate TypeScript from CUE files",
},
},
},
}
var Commands = []*cli.Command{