dmodel
dmodel copied to clipboard
building with json-schema
the build automatically discovers the json-schema package.json and sets the location for json-schema to be json-schema/lib based on the "directories" directive in the package.json. this causes the json-schema/lib/validate dependency to cause an error for the build since the build resolves that as json-schema/lib/lib/validate.
not sure what to do about this...
- use json-schema/validate as the dependency but configure the loader to set the location for the json-schema package to be json-schema/lib. this is not ideal since the default loader config won't work.
- change json-schema's package.json so that the build discovers json-schema/lib/validate as expected. this is not ideal since other node packages probably already rely on the
"directories"directive. - instruct people to include the following in their build profile - which is also not ideal since the default build profile config won't work.
{
name: 'json-schema',
location: 'json-schema',
resourceTags: {
amd: function (filename) {
return /\/lib\/(?:links|validate)\.js$/.test(filename);
}
}
},
i guess this issue could probably belong in the json-schema repo but i'm reporting it here in the hope that adopters of dmodel will find this issue before complaining about how it isn't working.