@@ -41,24 +41,26 @@ func newCmdScaffoldSource() *cobra.Command {
4141//go:embed templates/source/*
4242//go:embed templates/cloud-config-ui/public/*
4343//go:embed templates/cloud-config-ui/src/*
44- //go:embed templates/cloud-config-ui/.eslintrc.json
45- //go:embed templates/cloud-config-ui/.prettierrc
46- //go:embed templates/cloud-config-ui/.gitignore
47- //go:embed templates/cloud-config-ui/.nvmrc
48- //go:embed templates/cloud-config-ui/package.json
49- //go:embed templates/cloud-config-ui/README.md
50- //go:embed templates/cloud-config-ui/tsconfig.json
44+ //go:embed templates/cloud-config-ui/.eslintrc.json.tpl
45+ //go:embed templates/cloud-config-ui/.prettierrc.tpl
46+ //go:embed templates/cloud-config-ui/.gitignore.tpl
47+ //go:embed templates/cloud-config-ui/.nvmrc.tpl
48+ //go:embed templates/cloud-config-ui/package.json.tpl
49+ //go:embed templates/cloud-config-ui/README.md.tpl
50+ //go:embed templates/cloud-config-ui/tsconfig.json.tpl
5151var sourceFS embed.FS
5252
5353type scaffoldData struct {
5454 Org string
5555 Name string
56+ Kind string
5657}
5758
5859func runScaffoldSource (org string , name string , outputDir string ) error {
5960 data := scaffoldData {
6061 Org : org ,
6162 Name : name ,
63+ Kind : "source" ,
6264 }
6365 if err := copyGoFiles (data , outputDir ); err != nil {
6466 return fmt .Errorf ("failed to copy go files: %w" , err )
@@ -112,7 +114,7 @@ func copyConfigUIFiles(data scaffoldData, outputDir string) error {
112114 return nil
113115 }
114116 if strings .HasSuffix (fpath , ".tpl" ) {
115- outputPath := strings .TrimSuffix (strings .TrimPrefix (fpath , "templates/source " ), ".tpl" )
117+ outputPath := strings .TrimSuffix (strings .TrimPrefix (fpath , "templates/" ), ".tpl" )
116118 fullPath := outputDir + "/" + outputPath
117119 err = writeTemplate (data , fpath , fullPath )
118120 if err != nil {
0 commit comments