build.go 585 B

123456789101112131415161718192021222324252627
  1. package tst
  2. import (
  3. "fmt"
  4. . "git.eugeniocarvalho.dev/eugeniucarvalho/apicodegen/common"
  5. )
  6. var Build = func(project *Project, buildOptions *BuildOptions) (fn *BuildSet, err error) {
  7. var (
  8. before = []*Command{}
  9. )
  10. // path := fmt.Sprintf("%s", ts.OutputDir, project.ID)
  11. outputClientDir := fmt.Sprintf("%s/", project.Client("angular6").OutputDir)
  12. fn = &BuildSet{
  13. Before: before,
  14. After: []*Command{
  15. {
  16. Id: "format_ts",
  17. Cmd: fmt.Sprintf("tsfmt -r %s*.ts", outputClientDir),
  18. Description: "Formata todos os arquivos ts",
  19. },
  20. },
  21. }
  22. return
  23. }