Skip to content

Commit cbcff97

Browse files
committedMar 8, 2017
Automatically use Protractor conf for mac if running grunt on mac
1 parent 3fb4314 commit cbcff97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

Diff for: ‎Gruntfile.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var serveStatic = require('serve-static');
1313

1414
module.exports = function (grunt) {
1515
var contextRoot = grunt.option('contextRoot') || "dev-console";
16+
var isMac = /^darwin/.test(process.platform) || grunt.option('mac');
1617

1718
// Load grunt tasks automatically
1819
require('load-grunt-tasks')(grunt, {
@@ -704,14 +705,14 @@ module.exports = function (grunt) {
704705

705706
grunt.registerTask('test-integration',
706707
grunt.option('baseUrl') ?
707-
[grunt.option('mac') ? 'protractor:mac' : 'protractor:default'] : // if a baseUrl is defined assume we dont want to run the local grunt server
708+
[isMac ? 'protractor:mac' : 'protractor:default'] : // if a baseUrl is defined assume we dont want to run the local grunt server
708709
[
709710
'clean:server',
710711
'concurrent:server',
711712
'autoprefixer',
712713
'connect:test',
713714
'add-redirect-uri',
714-
(grunt.option('mac') ? 'protractor:mac' : 'protractor:default'),
715+
(isMac ? 'protractor:mac' : 'protractor:default'),
715716
'clean:server'
716717
]
717718
);

0 commit comments

Comments
 (0)
Please sign in to comment.