From 21ba263e30c523f6dd8f6ae779e32fa637814586 Mon Sep 17 00:00:00 2001 From: Nick Colley Date: Tue, 6 Sep 2016 15:14:42 +0100 Subject: [PATCH 1/2] Remove grunt-shell dependency and use npm script --- Gruntfile.js | 13 ++----------- package.json | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 422004c1..773b2948 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -49,16 +49,8 @@ module.exports = function(grunt) { loadPath: [ './stylesheets' ], - style: 'nested', + style: 'nested' } - }, - }, - shell: { - multiple: { - command: [ - 'bundle', - 'bundle exec govuk-lint-sass stylesheets' - ].join('&&') } } }); @@ -66,8 +58,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-jasmine'); grunt.loadNpmTasks('grunt-contrib-sass'); - grunt.loadNpmTasks('grunt-shell'); - grunt.registerTask('test', ['sass', 'clean', 'jasmine', 'shell']); + grunt.registerTask('test', ['sass', 'clean', 'jasmine']); grunt.registerTask('default', ['test']); }; diff --git a/package.json b/package.json index a537b0e0..0bf017b9 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "grunt-contrib-clean":"~0.6.0", "grunt-contrib-jasmine": "^1.0.0", "grunt-contrib-sass": "0.7.4", - "grunt-shell": "^1.1.2", "jquery": "~1.11.3" }, "scripts": { - "test": "node_modules/.bin/grunt test" + "test": "grunt test && npm run lint", + "lint": "bundle && bundle exec govuk-lint-sass stylesheets" } } From 8ccf388824e914c4be35f0f7e8cf871be2502fa7 Mon Sep 17 00:00:00 2001 From: Gemma Leigh Date: Mon, 19 Sep 2016 11:42:19 +0100 Subject: [PATCH 2/2] Use --silent here to reduce NPM error message output This then outputs `npm ERR! Test failed. See above for more details.`. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bf017b9..c57d18a9 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "jquery": "~1.11.3" }, "scripts": { - "test": "grunt test && npm run lint", + "test": "grunt test && npm run lint --silent", "lint": "bundle && bundle exec govuk-lint-sass stylesheets" } }