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
DocumentUp @ JSMontreal
Search
jeromegn
February 15, 2012
Programming
1
190
DocumentUp @ JSMontreal
jeromegn
February 15, 2012
Tweet
Share
More Decks by jeromegn
See All by jeromegn
Isomorphism in web apps
jeromegn
1
78
Other Decks in Programming
See All in Programming
C++でシェーダを書く
fadis
6
4.1k
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
110
Arm移行タイムアタック
qnighy
0
320
EventSourcingの理想と現実
wenas
6
2.3k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
CSC509 Lecture 12
javiergs
PRO
0
160
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
距離関数を極める! / SESSIONS 2024
gam0022
0
280
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
670
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
4 Signs Your Business is Dying
shpigford
180
21k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Music & Morning Musume
bryan
46
6.2k
Making Projects Easy
brettharned
115
5.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
The Language of Interfaces
destraynor
154
24k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
A Philosophy of Restraint
colly
203
16k
BBQ
matthewcrist
85
9.3k
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
[email protected]
\ 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