UNPKG

383 BJavaScriptView Raw
1"use strict";
2
3const { exec } = require("child_process");
4
5module.exports.launchChrome = function(url) {
6 const { platform } = process;
7
8 if (platform === "win32") {
9 exec(`start chrome ${url}`);
10 } else if (platform === "darwin") {
11 exec(`open -a "Google Chrome" ${url}`);
12 } else if (platform === "linux") {
13 exec(`google-chrome ${url}`);
14 }
15};