Skip to content

Commit 81112b1

Browse files
author
Rohan Jain
committed
Registar a grunt task for browserstack runner
Just executed the cli for now
1 parent 52f1899 commit 81112b1

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "browserstack-runner",
33
"description": "A command line interface to run browser tests over BrowserStack",
4-
"version": "0.0.10",
4+
"version": "0.0.11",
55
"homepage": "https://github.com/browserstack/browserstack-runner",
66
"repository": {
77
"type": "git",

tasks/browserstack_runner.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
var exec = require('child_process').exec;
2+
3+
module.exports = function(grunt) {
4+
grunt.registerTask('browserstack_runner','Your task description goes here.', function() {
5+
var done = this.async();
6+
7+
// Merge task-specific and/or target-specific options with these defaults.
8+
var options = this.options({
9+
punctuation: '.',
10+
separator: ', '
11+
});
12+
13+
var subProcess = exec('bash -c "PATH=$PATH:$(npm bin) browserstack-runner"', function (err, stdout, stderr) {
14+
done(err ? false : true);
15+
});
16+
17+
subProcess.stdout.on('data', function (_data) {
18+
grunt.log.writeln(_data.trim());
19+
});
20+
});
21+
};

0 commit comments

Comments
 (0)