Skip to content

Commit

Permalink
fix(shell.js): Adding windows support.
Browse files Browse the repository at this point in the history
Updating paths to support running tasks from windows.
  • Loading branch information
Marcelo Sauerbrunn Portugal authored and mportuga committed Mar 16, 2017
1 parent 2f5ac87 commit 5e43864
Showing 1 changed file with 36 additions and 26 deletions.
62 changes: 36 additions & 26 deletions grunt/shell.js
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'
}
};
};

0 comments on commit 5e43864

Please sign in to comment.