Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Using Source Maps in 2015
Search
Matt Steele
April 08, 2015
Programming
0
920
Using Source Maps in 2015
And introducing the greatest compiles-to-js language of all time, arnoldc.js
Matt Steele
April 08, 2015
Tweet
Share
More Decks by Matt Steele
See All by Matt Steele
Upgrading to Angular 2 using ngUpgrade
mattdsteele
0
1k
Reactive Programming with RxJS
mattdsteele
0
110
GET TO THE CHOPVAR
mattdsteele
0
180
Responsive Images using <picture> and srcset/sizes
mattdsteele
1
1.4k
The Decorator Pattern
mattdsteele
0
72
Diving Into the Device API
mattdsteele
1
770
Unit Testing JavaScript when you're Afraid of JavaScript
mattdsteele
3
720
What Zelda Taught Me about Front End Engineering
mattdsteele
5
1.1k
Other Decks in Programming
See All in Programming
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
690
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
120
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
ゲームの物理 剛体編
fadis
0
350
AIコーディングエージェント(Manus)
kondai24
0
180
認証・認可の基本を学ぼう前編
kouyuume
0
200
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
320
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
400
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
220
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
310
これならできる!個人開発のすゝめ
tinykitten
PRO
0
110
Featured
See All Featured
Fireside Chat
paigeccino
41
3.7k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Statistics for Hackers
jakevdp
799
230k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
BBQ
matthewcrist
89
9.9k
KATA
mclloyd
PRO
32
15k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Building Applications with DynamoDB
mza
96
6.8k
How to train your dragon (web standard)
notwaldorf
97
6.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Transcript
SOURCE MAPS
IT’S SHOWTIME
It’s 2015 Tools Are Complicated
Compilers
Compilers
Compilers
Compilers
Compilers
Transpilers
Transpilers
Transpilers
None
Preprocessors
Preprocessors
Preprocessors
Preprocessors
Postprocessors
Postprocessors
Postprocessors
Postprocessors
Postprocessors
I’LL BE BACK
Build Phase
Build Phase
Build Phase
Build Phase
Now you have two problems
None
DEBUG THIS
Source Maps To The Rescue
Content Source
CSS & JavaScript
app.js app.min.js Without Source Maps
app.js app.min.js app.min.js.map With Source Maps
None
None
None
None
Variable Length Quantity http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
It all Just Works
Demo
Multi-Level Source Maps
HASTA LA VISTA, BABY
ES6 CoffeeScript TypeScript
ES6 CoffeeScript TypeScript Concat
ES6 CoffeeScript TypeScript Concat Minify
Demo
ArnoldC
None
IT'S SHOWTIME TALK TO THE HAND "hello world" YOU HAVE
BEEN TERMINATED Hello World
GET TO THE CHOPPER a HERE IS MY INVITATION 4
GET UP b YOU'RE FIRED 2 ENOUGH TALK a = (4 + b) * 2
HEY CHRISTMAS TREE foo YOU SET US UP @I LIED
HEY CHRISTMAS TREE bar YOU SET US UP @NO PROBLEMO foo = false bar = true
Two Problems
1.
✓
✓ ✗ ✗
✓ … ✗ ✗
None
None
None
None
None
2.
2.
So
I wrote a compiler
arnoldc.js https://github.com/mattdsteele/arnoldc.js
Compiles from ArnoldC to JavaScript
Compiles from ArnoldC to JavaScript (With Source Maps)
DO IT NOW
11+ Source Maps
1. Upgrade your tools Tips
2. Gulp > Grunt (for this) Tips gulp.task('javascript', function() {
gulp.src('src/**/*.js') .pipe(sourcemaps.init()) .pipe(plugin1()) .pipe(plugin2()) .pipe(sourcemaps.write()) .pipe(gulp.dest('dist')); });
3. Inline your sourcesContent Tips
Tips 4. Source Map Visualization Tool http://sokra.github.io/source-map-visualization/
@mattdsteele http://steele.blue