|
1 |
| -module.exports = { |
2 |
| - // selenium no longer used |
3 |
| - selenium: { |
4 |
| - command: './selenium/start', |
5 |
| - options: { |
6 |
| - async: true |
7 |
| - } |
8 |
| - }, |
9 |
| - 'protractor-install': { |
10 |
| - command: 'node ./node_modules/protractor/bin/webdriver-manager update' |
11 |
| - }, |
12 |
| - 'protractor-start': { |
13 |
| - command: 'node ./node_modules/protractor/bin/webdriver-manager start', |
14 |
| - options: { |
15 |
| - // apparently webdriver/selenium writes lots of trash on stderr, and the real output on stdout. No idea why.... |
16 |
| - stderr: false, |
17 |
| - async: true, |
18 |
| - execOptions: { |
19 |
| - maxBuffer: 400*1024 // or whatever other large value you want |
| 1 | +module.exports = function() { |
| 2 | + var webdriverManagerPath = './node_modules/protractor/bin/webdriver-manager'; |
| 3 | + var bowerPath = './node_modules/bower/bin/bower'; |
| 4 | + |
| 5 | + if(process.platform === 'win32') { |
| 6 | + webdriverManagerPath = '.\\node_modules\\protractor\\bin\\webdriver-manager'; |
| 7 | + bowerPath = '.\\node_modules\\bower\\bin\\bower'; |
| 8 | + } |
| 9 | + |
| 10 | + return { |
| 11 | + // selenium no longer used |
| 12 | + selenium: { |
| 13 | + command: './selenium/start', |
| 14 | + options: { |
| 15 | + async: true |
20 | 16 | }
|
| 17 | + }, |
| 18 | + 'protractor-install': { |
| 19 | + command: 'node ' + webdriverManagerPath + ' update' |
| 20 | + }, |
| 21 | + 'protractor-start': { |
| 22 | + command: 'node ' + webdriverManagerPath + ' start', |
| 23 | + options: { |
| 24 | + // apparently webdriver/selenium writes lots of trash on stderr, and the real output on stdout. No idea why.... |
| 25 | + stderr: false, |
| 26 | + async: true, |
| 27 | + execOptions: { |
| 28 | + maxBuffer: 400*1024 // or whatever other large value you want |
| 29 | + } |
| 30 | + } |
| 31 | + }, |
| 32 | + 'bower-install': { |
| 33 | + command: 'node ' + bowerPath + ' install' |
| 34 | + }, |
| 35 | + 'hooks-install': { |
| 36 | + command: 'npm run init' |
21 | 37 | }
|
22 |
| - }, |
23 |
| - 'bower-install': { |
24 |
| - command: 'node ./node_modules/bower/bin/bower install' |
25 |
| - }, |
26 |
| - 'hooks-install': { |
27 |
| - command: 'npm run init' |
28 |
| - } |
| 38 | + }; |
29 | 39 | };
|
0 commit comments