Advertisement
Adam_Martin

Untitled

May 27th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require.config({
  2.   baseUrl: "/js/",
  3.   paths: {
  4.     "ko": "lib/ko",
  5.     "utils": "utils",
  6.     "io": "lib/socket.io"
  7.   },
  8.   "packages": [{
  9.     "name": "jade-runtime",
  10.     "location": "utils",
  11.     "main": "jade.runtime.js"
  12.   }]
  13.  
  14. });
  15.  
  16.  
  17. require(["jquery", "ko/ko", "io/socket.io"], function($, ko, io) {
  18.   $(function() {
  19.  
  20.     var socket = io.connect();
  21.  
  22.     socket.on('connect', function() {
  23.  
  24.     });
  25.  
  26.     require(["/templates/ui/comment.js"], function(comments) {
  27.       $('.comment-list').append(
  28.       comments({
  29.         item: 'привет'
  30.       }));
  31.     });
  32.  
  33.   });
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement