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) {
|
||||
var _ = require('lodash');
|
||||
// var wfs = require('./wfs');
|
||||
|
||||
var errorCount = 0;
|
||||
var warnings = context.getMessages();
|
||||
var out = require('./formatters/' + context.options.format)(warnings);
|
||||
// if (context.options.outFile) {
|
||||
@ -16,33 +14,9 @@ function printResults(context) {
|
||||
// }
|
||||
context.report(out);
|
||||
var grouped = _.groupBy(warnings, 'level');
|
||||
errorCount = grouped.ERROR ? grouped.ERROR.length : 0;
|
||||
return errorCount;
|
||||
return grouped.ERROR ? grouped.ERROR.length : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = {
|
||||
printResults: printResults//,
|
||||
// printHelp: printHelp
|
||||
printResults: printResults
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user