3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass build = {}, json = {}, logs = [], mods = {}, extras = [], warns = [],
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (d[name][n]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass for (var i in d[name][n]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var m = d[name][n][i];
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass hash = function(a) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass a.forEach(function(v) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var data = fs.readFileSync(file, 'utf8').split('\n'),
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (l.indexOf('component=') > -1 && l.indexOf('.') === -1) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass name = l.replace('\n', '').replace('component=', '');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (l.indexOf('component.use=') > -1 && (l.indexOf('#') === -1)) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass use = l.replace('\n', '').replace('component.use=', '').replace(/ /g, '').split(',');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (l.indexOf('component.requires=') > -1 && (l.indexOf('#') === -1)) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass requires = l.replace('\n', '').replace('component.requires=', '').replace(/ /g, '').split(',');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (l.indexOf('component.require=') > -1 && (l.indexOf('#') === -1)) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass warns.push(' ' + color('[' + name + ']') + ' Fixing component.require should be component.requires');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass requires = l.replace('\n', '').replace('component.require=', '').replace(/ /g, '').split(',');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass //console.log(' ' + d + '/');
741aad1de59d0780eb42d1d85f765c93281859feDav Glass if ((d.indexOf('yui') === 0 || d.indexOf('simpleyui') === 0)) {
2a022eeaaf7f7520f119bc521e851911bdca1f65Dav Glass //Skip the YUI object..
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass if (f === 'meta') {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass o.forEach(function(i) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var d = JSON.parse(fs.readFileSync(path.join(p, 'meta', i)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass } catch (e) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.error('Failed to parse JSON from: ', path.join(p, 'meta', i));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass for (var name in d) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass //console.log(' --', path.join('meta', i));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass warns.push(' ' + color('[' + name + ']') + ' has both a requires and a use. The use should define the requires. FIX!');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassvar comp = function(str, a /* JSON Meta*/, b /* Build Meta */) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!a && !b) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass //There is no use or require data for this module, skip it
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass extras.push(' ' + color('[' + str + ']') + ' data was not found in the JSON meta file');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' data was not found in the Build Properties files');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' JSON Meta "use" is not defined');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' Build Properties "use" is missing: ' + i);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' build file: ' + JSON.stringify(Object.keys(b1.use)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' meta json: ' + JSON.stringify(Object.keys(a1.use)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' JSON meta "use" is missing: ' + i);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' build file: ' + JSON.stringify(Object.keys(b1.use)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' meta json: ' + JSON.stringify(Object.keys(a1.use)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' Build Properties "requires" is missing: ' + i);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' build file: ' + JSON.stringify(Object.keys(b1.requires)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' meta json: ' + JSON.stringify(Object.keys(a1.requires)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' JSON meta "requires" is missing: ' + i);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' build file: ' + JSON.stringify(Object.keys(b1.requires)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' meta json: ' + JSON.stringify(Object.keys(a1.requires)));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassvar m = [].concat(Object.keys(build), Object.keys(json));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassm.forEach(function(v) {