-
Notifications
You must be signed in to change notification settings - Fork 157
add pre & post css transform callbacks to customize css transformatio… #146
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
Conversation
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.
Can you add cases to the projects in the e2e/projects/ that demonstrate what this PR is implementing
16f07a6
to
3c90e82
Compare
Hey @eddyerburgh , I've updated the PR with test cases, can you please look into it. Thanks |
…n behavior Update lib/compilers/helpers/module-name-mapper-helper.js typo Co-Authored-By: yohodopo <vamc.anne@gmail.com> Update lib/compilers/helpers/module-name-mapper-helper.js typo Co-Authored-By: yohodopo <vamc.anne@gmail.com>
I agree with this PR, but I think we should make it more general. The config option should be {
jest: {
'vue-jest': {
transform: {
scss: './custom-transform'
}
}
}
} And each transform should be a Jest transformer: // custom-transform.js
module.exports = {
process(src, filePath, config) {
// custom transform
}
} We could support // custom-transform.js
module.exports = {
process(src, filePath, config) {
// custom transform
},
postProcess(src, filePath, config) {
// ..
},
preProcess(src, filePath, config) {
// ..
},
} So in this PR can you make changes to the API to use |
9e11c36
to
c7a8e4c
Compare
c7a8e4c
to
ad1ebcf
Compare
@eddyerburgh, I've updated the PR to make the change generic. |
Thanks for the changes, I'm going to give this a full review at the weekend |
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.
Thanks, looks good 😄. I'm going to do some refactoring to use style compilation from @vue/component-compiler-utils, so will change the implementation a bit. But I'll keep the functionality you added in this PR.
pre & post css transform callbacks to customize css transformation behavior
Fixes #145, #125 by allowing users to write custom transformers similar to webpack loaders