-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add registerFilter method #233
Conversation
(at this point I need some feedback)
@dbanksdesign @chazzmoney before continuing this PR (updating tests and documentation) I need some feedback from you. Have a look at the code, it works but maybe (probably) can be better. Things I am not 100% sure:
|
For question 1, you are correct in the placement. For question 2, the initialization happens in the main index.js file: filter: {} in there and call it a day. Or do we want to include built-in filters? Maybe not if we are trying to distribute/open up the transforms/formats/actions. Sorry for stream of conscious here. |
Cool, I am happy then! :)
Ahh, now I get it! Now that you have explained it, makes total sense. OK, so we have these options:
Probably 2 is the simplest and clearest one. What do you think? |
I like 2 or 3. We can just go with 2, and then if we do add built-in filters in the future we can update it when that happens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny tiny thing...
@dbanksdesign wait before merging, I still have to update the documentation :) |
Good call, I might have merged today by accident |
@dbanksdesign I have updated the documentation files. Do you think is enough? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM |
* feat: add registerFilter method (#233) * doc: remove registerTemplate from examples (#232) * feat: add node example (#228) * feat: making include accept an array of globs, like source does (#227) * fix: the naming for Sass/Scss in documentation, tests, formats, fixes #213 (#222) * fix: handle showFileHeader option in androids formats templates, fixes #237 (#243)
Issue #, if available: #207 #199
Description of changes:
registerFilter
method for the StyleDictionary modulefilterProperties.js
to receive thefilter
parameter only as a functionfilter
parameter is an object in thetransformConfig
method, and added the handling of the case where the filter is a string (supposedly a filter registered viaregisterFilter
, otherwise throw an error)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.