Open gotwarlost opened 9 years ago
Hi there
It would be awesome ! I have no time to do it right now but it will definitely be better for all the community :D
I red a lot of code from you guys but I still don't get how Istanbul is doing all the magic. This repo is just some kind of fork of Ibrik which the same hacks long before me. Did you get in contact with them too ?
No - I didn't. It's just that a bunch of people have been asking for es6 support even at where I work so I thought I might do something about it. Let me know when we can collaborate on this. I might try to add source map support to istanbul in the meantime.
:+1:
+1. Strong interest in this one!
+1
+1
:+1:
:+1:
:+1:
+1
https://github.com/gotwarlost/istanbul/issues/212#issuecomment-117299669
is an attempt to get source-map support directly into istanbul. Anyone who can help me test this?
Alright @gotwarlost i finally got something in progress! Stay tuned :)
And @MalikAbed is helping me on this :+1:
The goal is making Istanbul support extra transpiled sourcemap.
All future transpilers just have need a little module called istanbul-<name>
and expose a function than transform code to ES5 and return a result object like
{
code: String,
map: String
}
See istanbul-babel example
I'm not in favor of modifying istanbul's instrumenter for dealing with source maps. This is because a source-map can map the code being instrumented into locations in multiple files which your modification does not handle correctly. For generality, I believe we should leave the instrumenter the way it is and transform the resultant coverage object at reporting time (which is what the source-map branch of istanbul does)
Alright.
So the process is :
?
@gotwarlost @douglasduteil any forward motion on this? Looks like the thread just kinda...died?
:+1:
+1
@chaseadamsio @gotwarlost No news You might want to follow this thread https://github.com/gotwarlost/istanbul/issues/212
@douglasduteil thank you
+1 thanks @douglasduteil
Hi, istanbul author here.
Would it make sense to add options to istanbul to make what you are doing possible directly in it?
Example:
My vested interest in this is that there are many other applications other than ES6 where source maps for instance is useful (e.g. minification/ bundling use cases for es5)
etc.