In order to render views on the client, the context preparation done in Solidus needs to be replicated in the browser. This is done by solidus-client.
This PR adds the ability to export the Solidus views to the browser, so solidus-client can use them. This is achieved with a custom Browserify transform, named solidify.
Simple example:
assets/scripts/index.js
var SolidusClient = require('solidus-client');
var view = require('solidus/views/my/view'); // Can end with .js, but not with .hbs
var solidus_client = new SolidusClient();
solidus_client
.render(view)
.end(function(html) {
console.log(html);
});
In order to render views on the client, the context preparation done in Solidus needs to be replicated in the browser. This is done by solidus-client.
This PR adds the ability to export the Solidus views to the browser, so solidus-client can use them. This is achieved with a custom Browserify transform, named solidify.
Simple example:
assets/scripts/index.js
gruntfile.js