Exemple #1
0
// Run simply calls the meta generator.
func (c *Command) Run() ([]string, error) {
	gen := meta.NewGenerator(
		"genjs.Generate",
		[]*codegen.ImportSpec{codegen.SimpleImport("github.com/raphael/goa/goagen/gen_js")},
		nil,
	)
	return gen.Generate()
}
Exemple #2
0
// Run simply calls the meta generator.
func (c *Command) Run() ([]string, error) {
	flags := map[string]string{"name": AppName}
	gen := meta.NewGenerator(
		"genmain.Generate",
		[]*codegen.ImportSpec{codegen.SimpleImport("github.com/raphael/goa/goagen/gen_main")},
		flags,
	)
	return gen.Generate()
}
Exemple #3
0
// Run simply calls the meta generator.
func (c *Command) Run() ([]string, error) {
	flags := map[string]string{"pkg": TargetPackage}
	gen := meta.NewGenerator(
		"genapp.Generate",
		[]*codegen.ImportSpec{codegen.SimpleImport("github.com/raphael/goa/goagen/gen_app")},
		flags,
	)
	return gen.Generate()
}
Exemple #4
0
// Run simply calls the meta generator.
func (c *Command) Run() ([]string, error) {
	flags := map[string]string{"url": ServiceURL}
	gen := meta.NewGenerator(
		"genschema.Generate",
		[]*codegen.ImportSpec{codegen.SimpleImport("github.com/raphael/goa/goagen/gen_schema")},
		flags,
	)
	return gen.Generate()
}
Exemple #5
0
// Run simply calls the meta generator.
func (c *Command) Run() ([]string, error) {
	if GenPkgName == "" {
		GenPkgName = filepath.ToSlash(filepath.Base(GenPkgPath))
	}
	gen := meta.NewGenerator(
		fmt.Sprintf("%s.Generate", GenPkgName),
		[]*codegen.ImportSpec{codegen.SimpleImport(GenPkgPath)},
		nil,
	)
	return gen.Generate()
}