gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

Adding declarations so Alpaca is never referenced from Global scope #719

Open ambischof opened 5 years ago

ambischof commented 5 years ago

There were several places where Alpaca was references without first declaring var Alpaca = $.alpaca; so I added this declaration where it was absent. This will allow Alpaca to be used in environments without window. It currently seems to work fine in the browser, due to assigning it directly to window, But we have been unable to use Alpaca in our unit tests because it won't run on node where there's no window. After these modifications, I was able to get it to work.