Saturday, May 30, 2020

What's a Sourcemap?

Unpublished post from 2016/2017:

http://blog.keithcirkel.co.uk/why-we-should-stop-using-grunt/

http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ :

Basically it's a way to map a combined/minified file back to an unbuilt state. 

Chrome Canary?

But why care about source maps?

Right now source mapping is only working between uncompressed/combined JavaScript to compressed/uncombined JavaScript, but the future is looking bright with talks of compiled-to-JavaScript languages such as CoffeeScript and even the possibility of adding support for CSS preprocessors like SASS or LESS.
In the future we could easily use almost any language as though it were supported natively in the browser with source maps:
  • CoffeeScript
  • ECMAScript 6 and beyond
  • SASS/LESS and others
  • Pretty much any language that compiles to JavaScript

BTW, what's Traceur? Takes future-JS and turns it into now-JS. (If you like to be ahead of the curve when writing code, but riding the wave with your deployment build.)

No comments:

Post a Comment