Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
27
gaia/build/jsonlint.js
Executable file
27
gaia/build/jsonlint.js
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var utils = require('./utils');
|
||||
var RE_JSON = /\.json$/;
|
||||
|
||||
exports.execute = function(options) {
|
||||
var jsons = [];
|
||||
var dirs = ['apps', 'dev_apps', 'build', 'customization', 'dev_apps',
|
||||
'locales', 'shared'];
|
||||
|
||||
dirs.forEach(function(dir) {
|
||||
var dirFile = utils.getFile(options.GAIA_DIR, dir);
|
||||
var files = utils.ls(dirFile, true).filter(function(f) {
|
||||
return RE_JSON.test(f.leafName);
|
||||
});
|
||||
jsons.push(...files);
|
||||
});
|
||||
|
||||
jsons.forEach(function(json) {
|
||||
try {
|
||||
JSON.parse(utils.getFileContent(json));
|
||||
} catch (e) {
|
||||
utils.log('jsonlint', 'JSON lint error: ' + json.path + '\n');
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
};
|
||||
Loading…
Reference in a new issue