mirror of
https://github.com/scratchfoundation/scratch-parser.git
synced 2025-08-28 22:18:45 -04:00
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:
parent
5daad968a4
commit
b808e7447f
11 changed files with 759 additions and 616 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue