dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass#!/usr/bin/env node
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glassvar path = require('path'),
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass fs = require('fs'),
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass root = path.join(__dirname, '../../'),
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass build = {}, json = {}, logs = [], mods = {}, extras = [], warns = [],
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass color = function(str, num) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass num = num || '37;40';
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass return "\033[" + num + "m" + str + "\033[0m"
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass },
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass parseMod = function(d, name) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass ['submodules', 'plugins'].forEach(function(n) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (d[name][n]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass for (var i in d[name][n]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var m = d[name][n][i];
adc6623c43f28ba487745ca6728cda4c70c73792Dav Glass if (!json[i]) {
adc6623c43f28ba487745ca6728cda4c70c73792Dav Glass json[i] = {};
adc6623c43f28ba487745ca6728cda4c70c73792Dav Glass }
f2cee31792133c1959453459050596b1f1dea795Dav Glass if (m.requires || m.use) {
f2cee31792133c1959453459050596b1f1dea795Dav Glass if (m.requires) {
f2cee31792133c1959453459050596b1f1dea795Dav Glass json[i].requires = m.requires.sort();
f2cee31792133c1959453459050596b1f1dea795Dav Glass }
f2cee31792133c1959453459050596b1f1dea795Dav Glass if (m.use) {
f2cee31792133c1959453459050596b1f1dea795Dav Glass json[i].use = m.use.sort();
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass parseMod(d[name][n], i);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass });
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass },
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass hash = function(a) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!a) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass return {};
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var b = {};
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass a.forEach(function(v) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass b[v] = v;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass });
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass return b;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass },
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass parseFile = function(file) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var data = fs.readFileSync(file, 'utf8').split('\n'),
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass name, m = false, use = false, requires = false;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass data.forEach(function(l) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (l.indexOf('component=') > -1 && l.indexOf('.') === -1) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass name = l.replace('\n', '').replace('component=', '');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
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 }
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 }
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 }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass });
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (use || requires) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var m = {};
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (use) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass m.name = name;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass m.use = use;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (requires) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass m.name = name;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass m.requires = requires
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass return m;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass };
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass//Begin..
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassconsole.log(color('Scanning: ' + root));
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glassvar dirs = fs.readdirSync(root);
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glassdirs.forEach(function(d) {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass var p = path.join(root, d);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass //console.log(' ' + d + '/');
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass var stat = fs.statSync(p);
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass if (stat.isDirectory()) {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass var files = fs.readdirSync(p);
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass files.forEach(function(f) {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass name = d;
741aad1de59d0780eb42d1d85f765c93281859feDav Glass if ((d.indexOf('yui') === 0 || d.indexOf('simpleyui') === 0)) {
2a022eeaaf7f7520f119bc521e851911bdca1f65Dav Glass //Skip the YUI object..
2a022eeaaf7f7520f119bc521e851911bdca1f65Dav Glass return;
2a022eeaaf7f7520f119bc521e851911bdca1f65Dav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass if (f === 'meta') {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass var o = fs.readdirSync(path.join(p, 'meta'));
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass o.forEach(function(i) {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass if (path.extname(i) === '.json') {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass try {
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 process.exit(1);
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass for (var name in d) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (d[name].use) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass //console.log(' --', path.join('meta', i));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!json[name]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass json[name] = {};
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass json[name].use = d[name].use.sort();
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (d[name].requires) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!json[name]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass json[name] = {};
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass json[name].requires = d[name].requires.sort();
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (d[name].requires && d[name].use) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass warns.push(' ' + color('[' + name + ']') + ' has both a requires and a use. The use should define the requires. FIX!');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass parseMod(d, name);
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass });
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass if (f.indexOf('.properties') !== -1) {
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass var m = parseFile(path.join(root, d, f));
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass if (m) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass name = m.name || d;
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (m.use) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!build[name]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass build[name] = {};
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass build[name].use = m.use.sort();
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (m.requires) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!build[name]) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass build[name] = {};
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass build[name].requires = m.requires.sort();
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass });
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass});
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassvar comp = function(str, a /* JSON Meta*/, b /* Build Meta */) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass var len = logs.length;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!a && !b) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass //There is no use or require data for this module, skip it
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass return;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (!a) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass a = {};
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass extras.push(' ' + color('[' + str + ']') + ' data was not found in the JSON meta file');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass return;
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!b) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass b = {};
adc6623c43f28ba487745ca6728cda4c70c73792Dav Glass if (!a.use && !a.requires) {
adc6623c43f28ba487745ca6728cda4c70c73792Dav Glass return;
adc6623c43f28ba487745ca6728cda4c70c73792Dav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' data was not found in the Build Properties files');
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass var a1 = {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass use: hash(a.use),
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass requires: hash(a.requires)
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass },
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass b1 = {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass use: hash(b.use),
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass requires: hash(b.requires)
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass };
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass if (!a.use && b.use) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.push(' ' + color('[' + str + ']') + ' JSON Meta "use" is not defined');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (a.use) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass for (var i in a1.use) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (!b1.use[i]) {
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)));
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (b.use) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass for (var i in b1.use) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (!a1.use[i]) {
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)));
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (a.requires) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass for (var i in a1.requires) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (!b1.requires[i]) {
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)));
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (b.requires) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass for (var i in b1.requires) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (!a1.requires[i]) {
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)));
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass }
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass if (logs.length > len) {
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass logs.push('');
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass }
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass};
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassvar m = [].concat(Object.keys(build), Object.keys(json));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassm.forEach(function(v) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass mods[v] = v;
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass});
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav GlassObject.keys(mods).sort().forEach(function(i) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass comp(i, json[i], build[i]);
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass});
dcf867898f7641811b300c3da22c2c6f84b78bdfDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassif (logs.length) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log('');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log(color('Meta Data Warnings', '33'));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass logs.forEach(function(i) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log(i);
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass });
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass}
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glassif (warns.length) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log('');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log(color('General Warnings', '33'));
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass warns.forEach(function(i) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log(i);
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass });
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass}
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glassif (extras.length) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log('');
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log(color('Other Warnings', '33'));
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass extras.forEach(function(i) {
3f08daf9e86a678cd3d4ff33803b7664764f85bdDav Glass console.log(i);
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass });
f234ab79aa42491681c4e42b0fc6221da157e86fDav Glass}