WriteFile writes .dmap v3 format with line and column mappings directly to a file
(path string, lineMappings []sourcemap.LineMapping, colMappings []sourcemap.ColumnMapping)
| 25 | |
| 26 | // WriteFile writes .dmap v3 format with line and column mappings directly to a file |
| 27 | func (w *Writer) WriteFile(path string, lineMappings []sourcemap.LineMapping, colMappings []sourcemap.ColumnMapping) error { |
| 28 | data, err := w.Write(lineMappings, colMappings) |
| 29 | if err != nil { |
| 30 | return err |
| 31 | } |
| 32 | return os.WriteFile(path, data, 0644) |
| 33 | } |
| 34 | |
| 35 | // countLineDirectives counts the number of //line directives in the source |
| 36 | func countLineDirectives(src []byte) uint32 { |