feat(schemas): add support for sprite files for 2.0 and 3.0

refactor schemas to support sprite2 and sprite3 files, while reusing rules in common with sb2 and
sb3 files

BREAKING CHANGE: Change to main API which now takes an additional boolean argument indicating
whether a sprite or project is being validated
This commit is contained in:
Karishma Chadha 2018-05-02 17:10:52 -04:00
parent 5daad968a4
commit b808e7447f
11 changed files with 759 additions and 616 deletions

View file

@ -8,10 +8,11 @@
* @return {void}
*/
module.exports = function (input, callback) {
var result;
try {
var result = JSON.parse(input);
callback(null, result);
result = JSON.parse(input);
} catch (e) {
return callback(e.toString());
}
return callback(null, result);
};