Open bvanderveen opened 9 years ago
This is my WIP:
https://github.com/bvanderveen/caut-javascript-ref/tree/requirejs-support
Would need to add the option to CautJSOpts
, pass it down to the template renderer, and finally add branches in the templates.
Hello! Thanks for your interest in Cauterize. Unfortunately, my expertise in JavaScript isn't what it would be. Because of this, I am exceptionally open to pull requests involving quality of life issues in the JavaScript implementation.
I've been working to use cauterize output in-browser. Unfortunately the
require
provided bynode
(and used in the JS templates in this project) isn't available in browsers. Moreover, because browsers load scripts asynchronously, we can't synchronously assign a module to a variable (var foo = require('foo.js')
).RequireJS is of a few tools that address this issue:
The alternative would be to use something like Browserfy to amalgamate scripts output by cauterize into a single file.
Would you accept a patch which added RequireJS support?