How are formats and transforms related?
shaunbent opened this issue · comments
This might be a super obvious question with a super obvious answer but I can't work it out.
I am trying to understand how formats and transforms are connected. For example, setting:
theo.registerTransform('ios', ['color/hex']);
How does Theo know which formats are ios
so that it should apply this transforms? I can't see where this happens in the code and it doesn't seem to be document.
If I create custom formats is there away to associate the custom format with these groupings or either create a new grouping entirely?
For example, I am trying to create a format which is specifically used by a Sketch plugin. I'd like to apply specific transforms to this format.
Sorry if I've missed the answer to this somewhere.
I found the answer to my question, this connection happens during when calling theo.convert
and is defined like this:
transform: {
type: 'web',
}
Sorry for posting the question, as I said I knew it would be a super obvious question, with an obvious answer.