DocumentUp @ JSMontreal

C96dbcc746d551ea0665da4a23536280?s=47 jeromegn
February 15, 2012

DocumentUp @ JSMontreal

C96dbcc746d551ea0665da4a23536280?s=128

jeromegn

February 15, 2012
Tweet

Transcript

  1. Instant documentation for your markdown

  2. @jeromegn • Web Developer at DemandForce • Creator of Backbone

    Todos • Jack of all trades
  3. Quick demo

  4. Why?

  5. Usage DocumentUp.document({ repo: "jeromegn/documentup", name: "DocumentUp", twitter: [ "jeromegn", "DocumentUp"

    ] });
  6. Two versions

  7. Version 1: All front-end

  8. Ender.js

  9. Assemble your own framework

  10. Bonzo: DOM Qwery: Selectors Bean: DOM Events Reqwest: AJAX Components

  11. npm install -g ender ender build bonzo qwery reqwest bean

  12. Github (JSONP) API

  13. marked.js is fast

  14. localStorage as a cache

  15. window.localStorage.setItem(“username/repository”, html) window.localStorage.getItem(“username/repository”)

  16. Version 2: All back-end

  17. Hosted

  18. Config documentup.json

  19. Post-Receive Hook

  20. On-demand

  21. POST curl -X POST --data-urlencode content@README.md \ http://documentup.com/compiled > index.html

    && open index.html
  22. 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(); } } });
  23. gh-pages <!DOCTYPE html> <html> <head> <script src="documentup.min.js"></script> <script> DocumentUp.document("username/repository"); </script>

    </head> <body></body> </html>
  24. 200 KB+ to 0.5 KB

  25. Open source jeromegn/DocumentUp

  26. Thank you