chrome-paths
Possible paths or binary names of Chrome, Chrome Canary and Chromium in the current platform
const chromePaths = ; // On macOS chromePathschrome; //=> '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'chromePathschromeCanary; //=> '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'chromePathschromium; //=> '/Applications/Chromium.app/Contents/MacOS/Chromium' // On Linux chromePathschrome; //=> 'google-chrome'chromePathschromeCanary; //=> nullchromePathschromium; //=> 'chromium' // On Windows chromePathschrome; //=> 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'chromePathschromeCanary; //=> 'C:\\Program Files (x86)\\Google\\Chrome SxS\\Application\\chrome.exe'chromePathschromium //=> 'C:\\Program Files (x86)\\Chromium\\Application\\chrome.exe' // On Solaris chromePathschrome; //=> nullchromePathschromeCanary; //=> nullchromePathschromium; //=> null
Installation
npm install chrome-paths
API
const chromePaths = ;
chromePaths.chrome, chromePaths.chromeCanary, chromePaths.chromium
Type: string
or null
const execFile = ;const promisify = ;const chrome chromeCanary = ; async { await chrome '--version'stdout; //=> 'Google Chrome 71.0.3578.98 \n' await chromeCanary '--version'stdout; //=> 'Google Chrome 74.0.3689.0 canary\n'};
Whether each property is a full path, just a binary name or null
depends on the current platform.
License
ISC License © 2018 - 2019 Shinnosuke Watanabe