-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(shell.js): Adding windows support.
Updating paths to support running tasks from windows.
- Loading branch information
Showing
1 changed file
with
36 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
module.exports = { | ||
// selenium no longer used | ||
selenium: { | ||
command: './selenium/start', | ||
options: { | ||
async: true | ||
} | ||
}, | ||
'protractor-install': { | ||
command: 'node ./node_modules/protractor/bin/webdriver-manager update' | ||
}, | ||
'protractor-start': { | ||
command: 'node ./node_modules/protractor/bin/webdriver-manager start', | ||
options: { | ||
// apparently webdriver/selenium writes lots of trash on stderr, and the real output on stdout. No idea why.... | ||
stderr: false, | ||
async: true, | ||
execOptions: { | ||
maxBuffer: 400*1024 // or whatever other large value you want | ||
module.exports = function() { | ||
var webdriverManagerPath = './node_modules/protractor/bin/webdriver-manager'; | ||
var bowerPath = './node_modules/bower/bin/bower'; | ||
|
||
if(process.platform === 'win32') { | ||
webdriverManagerPath = '.\\node_modules\\protractor\\bin\\webdriver-manager'; | ||
bowerPath = '.\\node_modules\\bower\\bin\\bower'; | ||
} | ||
|
||
return { | ||
// selenium no longer used | ||
selenium: { | ||
command: './selenium/start', | ||
options: { | ||
async: true | ||
} | ||
}, | ||
'protractor-install': { | ||
command: 'node ' + webdriverManagerPath + ' update' | ||
}, | ||
'protractor-start': { | ||
command: 'node ' + webdriverManagerPath + ' start', | ||
options: { | ||
// apparently webdriver/selenium writes lots of trash on stderr, and the real output on stdout. No idea why.... | ||
stderr: false, | ||
async: true, | ||
execOptions: { | ||
maxBuffer: 400*1024 // or whatever other large value you want | ||
} | ||
} | ||
}, | ||
'bower-install': { | ||
command: 'node ' + bowerPath + ' install' | ||
}, | ||
'hooks-install': { | ||
command: 'npm run init' | ||
} | ||
}, | ||
'bower-install': { | ||
command: 'node ./node_modules/bower/bin/bower install' | ||
}, | ||
'hooks-install': { | ||
command: 'npm run init' | ||
} | ||
}; | ||
}; |