solidusjs/solidus — pull request #116 by joanniclaborde (2014-08-21 16:19:38+00:00)
Title: Client-side view rendering

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](https://github.com/solidusjs/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](http://browserify.org) transform, named solidify.

Simple example:

`assets/scripts/index.js`
```javascript
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);
});
```

`gruntfile.js`
```javascript
//...
browserify: {
scripts: {
options: {
transform: ['solidus/solidify', 'hbsfy']
},
files: {
'assets/compiled/scripts.js': ['assets/scripts/index.js']
}
}
},

//...
grunt.registerTask( 'compilejs', ['browserify'] );
```

TODO

- Figure out the best way to request the resources through the server