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
Matt Steele
April 08, 2015
Programming
1.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
92
Diving Into the Device API
mattdsteele
1
900
Unit Testing JavaScript when you're Afraid of JavaScript
mattdsteele
3
870
What Zelda Taught Me about Front End Engineering
mattdsteele
5
1.2k
Other Decks in Programming
See All in Programming
リアルな遅延を測る仕様
kota_yata
1
130
Press start. Python's next generation.
willingc
PRO
3
250
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
180
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
780
信頼性の目標を誰も求めてない
shubox
0
240
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
160
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
170
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
830
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
170
My Marp Sample
sinoue0108
0
130
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
350
Visualization
eitanlees
152
17k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
530
Typedesign – Prime Four
hannesfritz
42
3.1k
New Earth Scene 8
popppiees
3
2.5k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Automating Front-end Workflow
addyosmani
1369
210k
RailsConf 2023
tenderlove
30
1.5k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
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