From 0a5947cb74d30c938f39070e121491d1e63ac193 Mon Sep 17 00:00:00 2001 From: Tjerk Ameel Date: Sun, 14 Sep 2014 20:26:02 +0200 Subject: [PATCH] Convert 'dir' setting to 'src and make 'dir' obsolete. --- tasks/lib/phpcs.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tasks/lib/phpcs.js b/tasks/lib/phpcs.js index a2d67c6..ccf7c0d 100644 --- a/tasks/lib/phpcs.js +++ b/tasks/lib/phpcs.js @@ -117,9 +117,15 @@ exports.init = function(grunt) { * @param Object runner */ exports.setup = function(runner) { + var dir, attr; + + if(runner.data.dir){ + dir = runner.data.dir; + grunt.log.writeln("The 'dir' option is deprecated, please use 'scr' instead."); + }else{ + dir = runner.files[0].src; + } - var dir = runner.data.dir, - attr; config = runner.options(defaults); for (attr in cliOptions) {