I'm trying to build an SDK that helps people instantiate and validate instances of Data Archetypes (pre-modeled JSON schemas for popular types of data).
The SDK is in one javascript file and the schemas are in .json
files on github.
In Gulp, I know how to pull in external files, but what tools can I use to inject the schemas into the SDK's javascript file at this.schema
in my main constructor function?
(function() {
function SDK() {
if (!(this instanceof SDK))
return new SDK();
this.schema = {};
}
})();