From e2d1969d68d935a760fb7ddd5616b2c5ae86da4d Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Thu, 4 Dec 2014 14:19:09 -0800 Subject: [PATCH] chore(grunt): remove unused code --- Gruntfile.js | 8 -------- lib/grunt/utils.js | 44 +------------------------------------------- package.json | 1 - 3 files changed, 1 insertion(+), 52 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index b4d9425bf0cb..6f72b931285f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -30,14 +30,6 @@ module.exports = function(grunt) { benchmarksPath: 'benchmarks' } }, - parallel: { - travis: { - tasks: [ - util.parallelTask(['test:unit', 'test:promises-aplus', 'tests:docs'], {stream: true}), - util.parallelTask(['test:e2e']) - ] - } - }, connect: { devserver: { diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js index 2803a9488619..4ef97500f1b1 100644 --- a/lib/grunt/utils.js +++ b/lib/grunt/utils.js @@ -11,21 +11,6 @@ var _ = require('lodash'); var CSP_CSS_HEADER = '/* Include this file in your html if you are using the CSP mode. */\n\n'; -var PORT_MIN = 8000; -var PORT_MAX = 9999; -var TRAVIS_BUILD_NUMBER = parseInt(process.env.TRAVIS_BUILD_NUMBER, 10); -var getRandomPorts = function() { - if (!process.env.TRAVIS) { - return [9876, 9877]; - } - - // Generate two numbers between PORT_MIN and PORT_MAX, based on TRAVIS_BUILD_NUMBER. - return [ - PORT_MIN + (TRAVIS_BUILD_NUMBER % (PORT_MAX - PORT_MIN)), - PORT_MIN + ((TRAVIS_BUILD_NUMBER + 100) % (PORT_MAX - PORT_MIN)) - ]; -}; - module.exports = { @@ -312,32 +297,5 @@ module.exports = { } next(); }; - }, - - parallelTask: function(args, options) { - var task = { - grunt: true, - args: args, - stream: options && options.stream - }; - - args.push('--port=' + this.sauceLabsAvailablePorts.pop()); - - if (args.indexOf('test:e2e') !== -1 && grunt.option('e2e-browsers')) { - args.push('--browsers=' + grunt.option('e2e-browsers')); - } else if (grunt.option('browsers')) { - args.push('--browsers=' + grunt.option('browsers')); - } - - if (grunt.option('reporters')) { - args.push('--reporters=' + grunt.option('reporters')); - } - - return task; - }, - - // see http://saucelabs.com/docs/connect#localhost - sauceLabsAvailablePorts: [9000, 9001, 9080, 9090, 9876], - // pseudo-random port numbers for BrowserStack - availablePorts: getRandomPorts() + } }; diff --git a/package.json b/package.json index fc446ebc1e13..63e141834794 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "grunt-jasmine-node": "git://github.com/vojtajina/grunt-jasmine-node.git#fix-grunt-exit-code", "grunt-jscs": "~0.7.1", "grunt-merge-conflict": "~0.0.1", - "grunt-parallel": "~0.3.1", "grunt-shell": "~1.1.1", "gulp": "~3.8.0", "gulp-concat": "^2.4.1",