A web framework
The router and controller, routes are declared like this:
route('/path', 'template name', function() {
this.yourVar = "Declared variables can be interpolated into templates!";
});
The templater, takes your template and interpolates js using the dank syntax:
#{yo= yourVar }
Unit testing done using jasmine, the tests can be found in test/spec
Run the test in the browser by opening test/SpecRunner.html
- Find a more effienct way of pulling in templates.
- Possibly investigate async way of pulling in template (controlled with Promise if need to defer execution)
- Add to juice:
-
var pasteurizer = new JuicePasteurizer(); var peeler = new JuicePeeler(); var sanitizedTemplate = pasteurizer.clean(peeler.find(templateName));