From d9d764d8ba969462bbab500788602dbe4d04ec9a Mon Sep 17 00:00:00 2001 From: Teo Metz Date: Tue, 18 Sep 2018 10:09:44 +0200 Subject: [PATCH 1/3] Fix xo to last supported version CI would break with more recent versions of xo as grunt-shell has to support node v4. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 47aafd4..3085c3e 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "devDependencies": { "grunt": "^1.0.1", "grunt-cli": "^1.2.0", - "xo": "*" + "xo": "0.20.3" }, "peerDependencies": { "grunt": ">=0.4.0" From d9c17469b440adbbac787b7e14e7d0ca78f45ef3 Mon Sep 17 00:00:00 2001 From: Teo Metz Date: Tue, 18 Sep 2018 10:12:30 +0200 Subject: [PATCH 2/3] Fix linting errors --- tasks/shell.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/shell.js b/tasks/shell.js index a175369..873ed78 100644 --- a/tasks/shell.js +++ b/tasks/shell.js @@ -26,7 +26,7 @@ module.exports = grunt => { throw new Error('`command` required'); } - // increase max buffer + // Increase max buffer opts.execOptions = Object.assign({}, opts.execOptions); opts.execOptions.maxBuffer = opts.execOptions.maxBuffer || TEN_MEGABYTES; From ee3f6ce881966b7eef6b6bdf8745368f72986072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=A9o=20Metz?= Date: Mon, 17 Sep 2018 23:22:54 +0200 Subject: [PATCH 3/3] Allow functions as shorthand commands --- tasks/shell.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/shell.js b/tasks/shell.js index 873ed78..0dc03eb 100644 --- a/tasks/shell.js +++ b/tasks/shell.js @@ -20,7 +20,9 @@ module.exports = grunt => { } }); - let cmd = typeof this.data === 'string' ? this.data : this.data.command; + let cmd = typeof this.data === 'string' || typeof this.data === 'function' ? + this.data : + this.data.command; if (cmd === undefined) { throw new Error('`command` required');