Closed ianstormtaylor closed 10 years ago
lgtm except for the reparse thing. I think most of users are just simply using myth as is, not as a plugin, so reparsing by default don't make sense (it's 1/3 of the time of the processing - firstparsing/postcss parsing/reparsing). And if we just don't reparse, rework.obj will be outdated. I think prefixes should be a specific feature at the end of the process, to allow skiping last parsing by default. Otherwise this sounds nice. Exposing features will allow us to add custom features as well. I was also thinking give users the ability to add stuff like rework-rem-fallback (for thoses who still support IE8 :p) by just adding "rem-fallback" as a feature (with the appropriate npm install).
@MoOx added a few more commits to fix the importer deprecation, and i think port the sourcemaps fix you had in the other pr. whenever you get a chance can you take a look at let me know what you think?
not sure how to elegantly solve the re-parsing, we might have to add a hack in index.js
unfortunately, i was hoping to keep all the plugin-specific hacks to the features.js
file :$
@ianstormtaylor I've rebased your PR on master & add a test for sourcemap.
So I'm merging.
I'll try to see how we can keep plugin-specific stuff in features.js
.
Okay, fixed that issue I was having sooner than I thought, so here is the refactor to make handling features pretty straightforward I think. @MoOx let me know what you think. Right now it doesn't smartly not re-parse based on whether it's looking for just the CSS or a plugin, but I think we could implement that by just using an extra option on
options
object, likereparse: false
that's internal.