From 1059d5525f1b4d362861077f3a7416c1b62cc49f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Thu, 8 Jan 2015 15:05:27 +0100 Subject: [PATCH] Add default port when --port is not passed to grunt --- server/sonar-web/Gruntfile.coffee | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/Gruntfile.coffee b/server/sonar-web/Gruntfile.coffee index 3815b01ffce..600c5680e70 100644 --- a/server/sonar-web/Gruntfile.coffee +++ b/server/sonar-web/Gruntfile.coffee @@ -1,5 +1,6 @@ module.exports = (grunt) -> pkg = grunt.file.readJSON('package.json') + expressPort = '<%= grunt.option("port") || 3000 %>' grunt.initConfig pkg: grunt.file.readJSON('package.json') @@ -298,7 +299,7 @@ module.exports = (grunt) -> test: options: script: '<%= pkg.sources %>js/tests/e2e/server.js' - port: '<%= grunt.option("port") %>' + port: expressPort dev: options: background: false @@ -312,21 +313,21 @@ module.exports = (grunt) -> 'no-colors': true 'fail-fast': true concise: true - port: '<%= grunt.option("port") %>' + port: expressPort src: ['<%= pkg.sources %>js/tests/e2e/tests/**/*.js'] single: options: test: true verbose: true 'fail-fast': true - port: '<%= grunt.option("port") %>' + port: expressPort src: ['<%= pkg.sources %>js/tests/e2e/tests/<%= grunt.option("spec") %>-spec.js'] testfile: options: test: true verbose: true 'fail-fast': true - port: '<%= grunt.option("port") %>' + port: expressPort src: ['<%= grunt.option("file") %>'] -- 2.39.5