-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile to html for use with Riot.js #47
Comments
You can do it by adding |
@gkopylov Actually it generated javascript not the HTML needed for Riot. I'm going to generate a simple html using Skim and ExecJs. How can I do server side rendering to HTML? I've tried |
@brauliobo yeah, you are right, but skim oriented for client side view, so it is compiled to JST template and render it on server side could be a bit tricky(but sure you can do it via ExecJS like it goes here https://github.com/jfirebaugh/skim/blob/master/test/helper.rb ). For server side view I recommend you to use slim https://github.com/slim-template/slim |
thanks @gkopylov, the main goal is to have isomorphic templates, so they can be used on Rails and on the Browser. I'm trying some workarounds to use Slim, see slim-template/slim#650 |
It is very interesting idea and I tried it earlier, but as a final result you will come to different context - in client side you will work with js objects(and then past it on skim template) and on server side you will need to serialize ruby objects and then past it in precompiled skim template, so not that simple and useful. Moreover you need to somehow create DOM on server side to proper work with output html. So I left this idea. But maybe you could do it better so good luck. |
@gkopylov About serialization of ruby objects to json, I think this is necessary one way or another, for APIs and dynamic interfaces. Then, |
Ok, I wish you to get excellent results for isomorphic templates and resolve all issues for this. Btw, try Turbolinks 3, it is really blazing fast, so you no need to use that hipsterish technology like Virtual dom and etc. |
I would like to
.js.tag.skim
files to be compiled to html so that I could use it with Riot as described at http://riotjs.com/guide/compiler/#pre-processorsHow could that be done? Maybe a
.html.skim
sprockets processor?The text was updated successfully, but these errors were encountered: