mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
cleanups
This commit is contained in:
parent
68407b6dc5
commit
e4bbd93844
30
src/shell.js
30
src/shell.js
@ -5,8 +5,6 @@
|
|||||||
function printResults(context) {
|
function printResults(context) {
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
// var wfs = require('./wfs');
|
// var wfs = require('./wfs');
|
||||||
|
|
||||||
var errorCount = 0;
|
|
||||||
var warnings = context.getMessages();
|
var warnings = context.getMessages();
|
||||||
var out = require('./formatters/' + context.options.format)(warnings);
|
var out = require('./formatters/' + context.options.format)(warnings);
|
||||||
// if (context.options.outFile) {
|
// if (context.options.outFile) {
|
||||||
@ -16,33 +14,9 @@ function printResults(context) {
|
|||||||
// }
|
// }
|
||||||
context.report(out);
|
context.report(out);
|
||||||
var grouped = _.groupBy(warnings, 'level');
|
var grouped = _.groupBy(warnings, 'level');
|
||||||
errorCount = grouped.ERROR ? grouped.ERROR.length : 0;
|
return grouped.ERROR ? grouped.ERROR.length : 0;
|
||||||
return errorCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* print help for a command
|
|
||||||
* @param {string} command
|
|
||||||
* @return {number}
|
|
||||||
*/
|
|
||||||
//function printHelp(command) {
|
|
||||||
// var wfs = require('./wfs');
|
|
||||||
// var path = require('path');
|
|
||||||
// var h = wfs.readJSON(path.resolve(__dirname, 'data/help.json'));
|
|
||||||
// var commandHelp = h.commands[command];
|
|
||||||
// if (!commandHelp) {
|
|
||||||
// console.log('could not find help for command ' + command);
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
// var msg = 'SYNOPSIS\n' +
|
|
||||||
// ' ' + commandHelp.SYNOPSIS + '\n' +
|
|
||||||
// 'DESCRIPTION\n' +
|
|
||||||
// ' ' + commandHelp.DESCRIPTION;
|
|
||||||
// console.log(msg);
|
|
||||||
// return 0;
|
|
||||||
//}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
printResults: printResults//,
|
printResults: printResults
|
||||||
// printHelp: printHelp
|
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user