You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Dojo etc. moving to AMD for lazy module loading, it would be great if JSV could support the AMD loader, rather than/as well as the CommonJS require() behaviour currently in place.
For minimal sites, Almond, a really small AMD shim, is only 2.3KB compiled.
All require calls use path-related addressing like "./" which makes them path dependent on installation inside project and hence requires configuration tweaks.
this.JSV = JSV; //set global object
exports.JSV = JSV; //export to CommonJS
This fork of GaryCourt's JSV manually converts all relevant commonJS modules to requireJS modules. Everything should continue to work like normal, except that schema definitions must now be explicitly imported (no default is set).
With Dojo etc. moving to AMD for lazy module loading, it would be great if JSV could support the AMD loader, rather than/as well as the CommonJS require() behaviour currently in place.
For minimal sites, Almond, a really small AMD shim, is only 2.3KB compiled.
There are instructions on converting "traditional" CommonJS loading behaviour to AMD here: http://requirejs.org/docs/commonjs.html
This means that those using the AMD loader method would be able to do the following, thus only loading JSV when required:
The text was updated successfully, but these errors were encountered: