Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Using Source Maps in 2015
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Matt Steele
April 08, 2015
Programming
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using Source Maps in 2015
And introducing the greatest compiles-to-js language of all time, arnoldc.js
Matt Steele
April 08, 2015
More Decks by Matt Steele
See All by Matt Steele
Upgrading to Angular 2 using ngUpgrade
mattdsteele
0
1.2k
Reactive Programming with RxJS
mattdsteele
0
120
GET TO THE CHOPVAR
mattdsteele
0
200
Responsive Images using <picture> and srcset/sizes
mattdsteele
1
1.5k
The Decorator Pattern
mattdsteele
0
91
Diving Into the Device API
mattdsteele
1
880
Unit Testing JavaScript when you're Afraid of JavaScript
mattdsteele
3
840
What Zelda Taught Me about Front End Engineering
mattdsteele
5
1.2k
Other Decks in Programming
See All in Programming
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
500
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
480
関数型プログラミングのメリットって何だろう?
wanko_it
0
170
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
240
フィードバックで育てるAI開発
kotaminato
1
110
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
170
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.9k
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.3k
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.5k
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
260
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
390
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
The Spectacular Lies of Maps
axbom
PRO
1
850
Google's AI Overviews - The New Search
badams
0
1.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
It's Worth the Effort
3n
188
29k
Exploring anti-patterns in Rails
aemeredith
3
440
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Into the Great Unknown - MozCon
thekraken
41
2.6k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
My Coaching Mixtape
mlcsv
0
170
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