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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Matt Steele
April 08, 2015
Programming
0
950
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
77
Diving Into the Device API
mattdsteele
1
790
Unit Testing JavaScript when you're Afraid of JavaScript
mattdsteele
3
740
What Zelda Taught Me about Front End Engineering
mattdsteele
5
1.1k
Other Decks in Programming
See All in Programming
CSC307 Lecture 03
javiergs
PRO
1
480
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
410
Fragmented Architectures
denyspoltorak
0
140
Oxlintはいいぞ
yug1224
5
1.1k
AgentCoreとHuman in the Loop
har1101
5
200
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.2k
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
組織で育むオブザーバビリティ
ryota_hnk
0
150
Deno Tunnel を使ってみた話
kamekyame
0
350
CSC307 Lecture 04
javiergs
PRO
0
650
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
260
CSC307 Lecture 01
javiergs
PRO
0
680
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
740
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
58
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
WENDY [Excerpt]
tessaabrams
9
35k
Building Adaptive Systems
keathley
44
2.9k
Navigating Weather and Climate Data
rabernat
0
74
Odyssey Design
rkendrick25
PRO
0
470
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
72
A Tale of Four Properties
chriscoyier
162
24k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
180
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