Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
DocumentUp @ JSMontreal
jeromegn
February 15, 2012
Programming
1
130
DocumentUp @ JSMontreal
jeromegn
February 15, 2012
Tweet
Share
More Decks by jeromegn
See All by jeromegn
Isomorphism in web apps
jeromegn
1
69
Other Decks in Programming
See All in Programming
코드 품질 1% 올리기
pluu
1
1k
プログラミングを勉強したいと言われたら
yuba_4
0
430
Quartoを使ってみませんか / quarto_get_started
s_uryu
2
440
Named Document って何?
harunakano
0
620
カラーミーショップは私たちが作っています
kenchan
0
130
Loom is Blooming
josepaumard
3
570
Reactでアプリケーションを構築する多様化
sakito
4
3.5k
クリエイティブ系のウェブサイト制作で役立つCSS技法 / CSS for develop creative website
clockmaker
2
1.7k
職場にPythonistaを増やす方法
soogie
0
330
httputil.ReverseProxy でもリトライがしたい
toga4
1
140
Kotlin KSP - Intro
taehwandev
1
520
実録mruby組み込み体験
coe401_
0
120
Featured
See All Featured
Bash Introduction
62gerente
596
210k
Designing Experiences People Love
moore
130
22k
What’s in a name? Adding method to the madness
productmarketing
11
1.5k
Rails Girls Zürich Keynote
gr2m
86
12k
A Philosophy of Restraint
colly
192
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
224
49k
What the flash - Photography Introduction
edds
61
10k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
172
8.3k
Designing with Data
zakiwarfel
91
3.9k
Designing for humans not robots
tammielis
241
23k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
181
15k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
100
5.9k
Transcript
Instant documentation for your markdown
@jeromegn • Web Developer at DemandForce • Creator of Backbone
Todos • Jack of all trades
Quick demo
Why?
Usage DocumentUp.document({ repo: "jeromegn/documentup", name: "DocumentUp", twitter: [ "jeromegn", "DocumentUp"
] });
Two versions
Version 1: All front-end
Ender.js
Assemble your own framework
Bonzo: DOM Qwery: Selectors Bean: DOM Events Reqwest: AJAX Components
npm install -g ender ender build bonzo qwery reqwest bean
Github (JSONP) API
marked.js is fast
localStorage as a cache
window.localStorage.setItem(“username/repository”, html) window.localStorage.getItem(“username/repository”)
Version 2: All back-end
Hosted
Config documentup.json
Post-Receive Hook
On-demand
POST curl -X POST --data-urlencode content@README.md \ http://documentup.com/compiled > index.html
&& open index.html
JSONP $.ajax({ url: "http://documentup.com/compiled", dataType: "jsonp", data: { content: "#
test", name: "Test JSONP!" }, success: function(resp){ // `status` is always provided if (resp.status == 200) { // Write to your document document.open(); document.write(resp.html); document.close(); } } });
gh-pages <!DOCTYPE html> <html> <head> <script src="documentup.min.js"></script> <script> DocumentUp.document("username/repository"); </script>
</head> <body></body> </html>
200 KB+ to 0.5 KB
Open source jeromegn/DocumentUp
Thank you