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
0
810
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
850
Reactive Programming with RxJS
mattdsteele
0
100
GET TO THE CHOPVAR
mattdsteele
0
150
Responsive Images using <picture> and srcset/sizes
mattdsteele
1
1.2k
The Decorator Pattern
mattdsteele
0
55
Diving Into the Device API
mattdsteele
1
580
Unit Testing JavaScript when you're Afraid of JavaScript
mattdsteele
3
630
What Zelda Taught Me about Front End Engineering
mattdsteele
5
940
Other Decks in Programming
See All in Programming
私の愛したLaravel 〜レールを超えたその先へ〜
kentaroutakeda
12
3.7k
AI時代のプログラミング教育 / programming education in ai era
kishida
23
21k
SLI/SLOの設定を進めるその前に アラート品質の改善に取り組んだ話
tanden
2
770
CTFのWebにおける⾼難易度問題について
hamayanhamayan
1
1k
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
260
ローコードサービスの進化のためのモノレポ移行
taro28
1
350
複雑なフォームと複雑な状態管理にどう向き合うか / #newt_techtalk vol. 15
izumin5210
4
3.7k
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
630
Productivity is Messing Around and Having Fun
hollycummins
0
170
なぜselectはselectではないのか
taiyow
2
320
WordPress Playground for Developers
iambherulal
0
120
エンジニア未経験が最短で戦力になるためのTips
gokana
0
240
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
39
7.2k
Making Projects Easy
brettharned
116
6.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
177
52k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
30k
Agile that works and the tools we love
rasmusluckow
328
21k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
GitHub's CSS Performance
jonrohan
1030
460k
Thoughts on Productivity
jonyablonski
69
4.5k
Building an army of robots
kneath
304
45k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.6k
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