move file up to date message to verbose
This commit is contained in:
parent
b2956ac812
commit
e3a23fb1fb
|
@ -134,9 +134,11 @@
|
|||
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
|
||||
|
||||
"react/display-name": 2,
|
||||
"react/jsx-boolean-value": 1,
|
||||
"react/jsx-quotes": 1,
|
||||
"react/jsx-no-undef": 1,
|
||||
"react/jsx-sort-props": 1,
|
||||
"react/jsx-sort-prop-types": 0,
|
||||
"react/jsx-uses-react": 1,
|
||||
"react/jsx-uses-vars": 1,
|
||||
"react/no-did-mount-set-state": 1,
|
||||
|
@ -146,7 +148,8 @@
|
|||
"react/prop-types": 1,
|
||||
"react/react-in-jsx-scope": 1,
|
||||
"react/self-closing-comp": 1,
|
||||
"react/wrap-multilines": 1
|
||||
"react/wrap-multilines": 1,
|
||||
"react/sort-comp": 1
|
||||
},
|
||||
"env": {
|
||||
"browser": false,
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"brace": "^0.5.1",
|
||||
"brfs": "^1.4.0",
|
||||
"coveralls": "^2.11.2",
|
||||
"eslint-plugin-react": "^2.2.0",
|
||||
"eslint-plugin-react": "^2.3.0",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-browserify": "^3.8.0",
|
||||
"grunt-contrib-requirejs": "^0.4.4",
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var util = require('util');
|
||||
var chalk = require('chalk');
|
||||
var reactTemplates = require('./reactTemplates');
|
||||
var convertRT = reactTemplates.convertRT;
|
||||
|
@ -23,7 +24,7 @@ function convertFile(source, target, options, context) {
|
|||
var fsUtil = require('./fsUtil');
|
||||
|
||||
if (!options.force && !fsUtil.isStale(source, target)) {
|
||||
context.info('target file ' + chalk.cyan(target) + ' is up to date, skipping', source);
|
||||
context.verbose(util.format('target file %s is up to date, skipping', chalk.cyan(target)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,14 +3,12 @@
|
|||
* Created by idok on 11/10/14.
|
||||
*/
|
||||
'use strict';
|
||||
//var fs = require('fs');
|
||||
var _ = require('lodash');
|
||||
var path = require('path');
|
||||
var api = require('./api');
|
||||
var context = require('./context');
|
||||
var shell = require('./shell');
|
||||
var pkg = require('../package.json');
|
||||
//var defaultOptions = {commonJS: false, force: false, json: false};
|
||||
var options = require('./options');
|
||||
var reactDOMSupport = require('./reactDOMSupport');
|
||||
var reactTemplates = require('./reactTemplates');
|
||||
|
@ -49,6 +47,7 @@ function printVersions(currentOptions) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {CONTEXT} context
|
||||
* @param {*} currentOptions
|
||||
* @param {string} filename file name to process
|
||||
*/
|
||||
|
@ -88,11 +87,11 @@ function execute(args) {
|
|||
console.error(error.message);
|
||||
return 1;
|
||||
}
|
||||
//console.log(currentOptions);
|
||||
return executeOptions(currentOptions);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
context: context,
|
||||
execute: execute,
|
||||
executeOptions: executeOptions,
|
||||
handleSingleFile: handleSingleFile,
|
||||
|
|
|
@ -34,6 +34,11 @@ var context = {
|
|||
report: function (msg) {
|
||||
console.log(msg);
|
||||
},
|
||||
verbose: function (msg) {
|
||||
if (context.options.verbose) {
|
||||
console.log(msg);
|
||||
}
|
||||
},
|
||||
info: function (msg, file, line, column) {
|
||||
context.issue(MESSAGE_LEVEL.INFO, msg, file, line, column);
|
||||
},
|
||||
|
@ -72,4 +77,4 @@ var context = {
|
|||
MESSAGE_LEVEL: MESSAGE_LEVEL
|
||||
};
|
||||
|
||||
module.exports = context;
|
||||
module.exports = context;
|
||||
|
|
Loading…
Reference in New Issue