From abaa5978eee7bc50f83f55328b37704043bc5d2c Mon Sep 17 00:00:00 2001 From: abac Date: Mon, 19 Jan 2015 00:17:49 +0000 Subject: [PATCH 1/2] fix --- package.json | 2 +- tasks/closure-compiler.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9c0032c..eb9f52a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-closure-compiler", "description": "A Grunt task for Closure Compiler.", - "version": "0.0.21", + "version": "0.0.22", "homepage": "https://github.com/gmarty/grunt-closure-compiler", "author": { "name": "Guillaume Marty", diff --git a/tasks/closure-compiler.js b/tasks/closure-compiler.js index 17bc38e..5c112a6 100644 --- a/tasks/closure-compiler.js +++ b/tasks/closure-compiler.js @@ -58,7 +58,7 @@ module.exports = function(grunt) { } if (data.externs) { - data.externs = grunt.file.expand(data.externs); + data.externs = grunt.file.expand({cwd: data.cwd}, data.externs); command += ' --externs ' + data.externs.join(' --externs '); if (!data.externs.length) { @@ -67,7 +67,7 @@ module.exports = function(grunt) { } if (data.options.externs) { - data.options.externs = grunt.file.expand(data.options.externs); + data.options.externs = grunt.file.expand({cwd: data.cwd}, data.options.externs); if (!data.options.externs.length) { delete data.options.externs; From 68fe660219fad31027acc5a19438233a451f14d9 Mon Sep 17 00:00:00 2001 From: abac Date: Mon, 19 Jan 2015 00:25:06 +0000 Subject: [PATCH 2/2] fix --- tasks/closure-compiler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/closure-compiler.js b/tasks/closure-compiler.js index 5c112a6..f87a1e8 100644 --- a/tasks/closure-compiler.js +++ b/tasks/closure-compiler.js @@ -59,10 +59,11 @@ module.exports = function(grunt) { if (data.externs) { data.externs = grunt.file.expand({cwd: data.cwd}, data.externs); - command += ' --externs ' + data.externs.join(' --externs '); if (!data.externs.length) { delete data.externs; + } else { + command += ' --externs ' + data.externs.join(' --externs '); } }