Package Exports
- edge-paths
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (edge-paths) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Edge Paths
Possible paths or binary names of Edge in the current platform
const edgePaths = require("edge-paths");
// On macOS
edgePaths.edge; //=> '/Users/quantum/Desktop/code/edge-paths/node_modules/edge-launcher/dist/x86/MicrosoftEdgeLauncher.exe'
// On Linux
edgePaths.edge; //=> 'edge'
// On Windows
edgePaths.edge; //=> 'C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe'
// On Solaris (Unsupported platform)
edgePaths.edge; //=> null
Installation
npm install edge-paths
API
const edgePaths = require("edge-paths");
edgePaths.chrome, edgePaths.chromeCanary, edgePaths.chromium
Type: string
or null
const { execFile } = require("child_process");
const { promisify } = require("util");
const { chrome, chromeCanary } = require("edge-paths");
(async () => {
(await promisify(execFile)(chrome, ["--version"])).stdout; //=> 'Google Chrome 71.0.3578.98 \n'
(await promisify(execFile)(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 © 2020 Shirshak Bajgain