(transformables ...*Transformable)
| 80 | } |
| 81 | |
| 82 | func Load(transformables ...*Transformable) (*Map, error) { |
| 83 | browser, err := load(PlatformDOM, transformables) |
| 84 | if err != nil { |
| 85 | return nil, err |
| 86 | } |
| 87 | node, err := load(PlatformSSR, transformables) |
| 88 | if err != nil { |
| 89 | return nil, err |
| 90 | } |
| 91 | return &Map{browser, node}, nil |
| 92 | } |
| 93 | |
| 94 | func getTransform(transformable *Transformable, platform Platform) (func(file *File) error, bool) { |
| 95 | tr, ok := transformable.For[platform] |