Chaplin.js and SocketStream

177 views
Skip to first unread message

Amjad

unread,
May 27, 2012, 5:40:20 AM5/27/12
to socket...@googlegroups.com
Hello everybody!

I'm pretty new to the world of Node, so I apology in advance if this was easy :)

I've been playing for a while with SocketStream and I had written before a small app using brunch-with-chaplin. I'm trying to integrate my app as a client app in SocketStream.

I've been quite confused how to rearrange the code of chaplinjs especially that it is written in a way only brunch can handle it... I also tried to go to the main chaplinjs repo, but was also confused how to rewrite my app with no dependency on brunch and how integrate all of that again in SocketStream.

In other words: what is the best way to make SocketStream handle the compilation of Chaplin app?

I thought it would be great if anyone had tried to do that before. Thanks in advance!

Best regards,

Amjad

Amjad

unread,
May 27, 2012, 9:02:11 AM5/27/12
to socket...@googlegroups.com
Oh I was finally able to integrate them :)

  • I had to re-write all the require clauses of the chaplin files so that the use relative paths (e.g. require '/routes' instead of  require 'routes')
  • I also another problem (which I was not yet able to solve) which is that the Backbone.Events is not being load before initializing the application, despite that backbone script library was included before the script initializing my app. So I had to include it manually in view of my app..
  • The last problem which yet also hasn't been solved is that  ss.tmpl[] doesn't seem to fit with Chaplin views..

Yi Wang

unread,
Sep 26, 2012, 2:09:21 AM9/26/12
to socket...@googlegroups.com
I forked the tweet your brunch example and made a ss and chaplin version:
It works.

I did the same to re-write require clauses using ss style require path, but I do not experience Backbone.Events not loading issue, to use ss.tmpl with Chaplin view, I forked ss-hogan and made ss-handlebars:

A customized Chaplin is used to work with SS.
Reply all
Reply to author
Forward
0 new messages