Build builds the source files and output into 'dist'.
()
| 65 | |
| 66 | // Build builds the source files and output into 'dist'. |
| 67 | func (k JsSDK) Build() error { |
| 68 | ok, err := target.Dir( |
| 69 | filepath.Join("sdk", "js", "dist"), |
| 70 | filepath.Join("sdk", "js", "src"), |
| 71 | filepath.Join("sdk", "js", "generated"), |
| 72 | ) |
| 73 | if err != nil { |
| 74 | return targetError(err) |
| 75 | } |
| 76 | if !ok { |
| 77 | return nil |
| 78 | } |
| 79 | mg.Deps(k.Deps, k.Definitions) |
| 80 | if mg.Verbose() { |
| 81 | fmt.Println("Building JS SDK files") |
| 82 | } |
| 83 | return k.runYarnCommandV("build") |
| 84 | } |
| 85 | |
| 86 | // Watch builds the source files in watch mode. |
| 87 | func (k JsSDK) Watch() error { |
nothing calls this directly
no test coverage detected