accord
accord copied to clipboard
Multi Stage Sourcemap Support
In addition to simply accepting input text, each adapter should also accept an object containing input text and a sourcemap, and if the adapter produces a sourcemap of its own, merge it with the incoming sourcemap. Not a super complicated change, nor is it breaking, just want to have it noted here as this will be an important feature down the line.
So is this why sourcemaps wouldn't work if I'm using both postcss and stylus as multi compile?
Yes. Won't be a huge feature to add though, just need some time or someone to contribute!
On Tue, Jul 7, 2015, 8:51 PM Daniel Box [email protected] wrote:
So is this why sourcemaps wouldn't work if I'm using both postcss and stylus as multi compile?
— Reply to this email directly or view it on GitHub https://github.com/jenius/accord/issues/103#issuecomment-119301914.
maybe @hhsnopek ? :angel: :pray:
Could you define merge @jenius? For instance if we have multipass on .css.styl
, which will start with stylus, then move to postcss, will it only contain the original stylus code then append the postcss code?
Basically input should take either a string or an object, then if its an object and has a sourcemap key/val pair, it should run a sourcemap merge as such: https://github.com/jenius/autoprefixer-stylus/blob/master/index.js#L45