Last active
October 29, 2015 00:49
-
-
Save chrisl8888/629a934aa70f268be994 to your computer and use it in GitHub Desktop.
Gulp open chrome in windows with arguments borrowed from - https://github.com/karma-runner/karma/issues/479
This file contains hidden or 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
| gulp.task('open', function (done) { | |
| var uri = 'http://localhost:' + CONFIG.PORT + '/tms.html'; | |
| var spawn = require('child_process').spawn, | |
| tempDir = 'C:/temp-chrome-eng'; | |
| var args = [ | |
| '--user-data-dir=' + tempDir, | |
| '--no-default-browser-check', | |
| '--no-first-run', | |
| '--disable-default-apps', | |
| '--start-maximized', | |
| uri | |
| ]; | |
| var cmd = 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'; | |
| var chrome = spawn(cmd, args); | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a more sophisticated example utilize karma-chrome-launcher (https://github.com/karma-runner/karma-chrome-launcher/blob/master/index.js)