In Google Chrome there are already sourcemaps for JS and CSS, CoffeeScript etc., and Paul Irish just demostrated SASS using sourcemaps.
It is a a technique to map development source files to the compiled results in the browser to allow navigating back to the source.
So, is there sourcemaps for HTML now? Languages like Jade, Slim really want such features so that people may debug them more easily.
They are particularly useful for you and your team because they help tremendously for debugging issues as well as day-to-day work. I'm sure I make use of them just about every day. I'd say in general, they are used for local development.
A source map is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger.
To enable source maps in Google Chrome, go to Developer Tools, click the little cog icon, and then make sure that “Enable Javascript source maps” is checked. That's it.
Sourcemaps, ready to use for HTML today no. This is also something very complex to implement.
This can change in future. If this response was marked as correct, and someone knows after some time that my answer is not more true, please comment below I'm wrong.
It is dead simnple to generate sourcemaps in a generic way like for css, but there is no browser support for it.
Some editors have plugins to support this. But be aware: this works best for static pages. (pug/jade, ... - using this at our place with nodejs+gulp)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With