UNPKG

2.88 kBMarkdownView Raw
1# Edge Paths
2
3[![npm version](https://img.shields.io/npm/v/edge-paths.svg)](https://www.npmjs.com/package/edge-paths)
4[![Downloads](https://img.shields.io/npm/dm/edge-paths.svg)](https://npmjs.com/edge-paths)
5[![Install size](https://packagephobia.now.sh/badge?p=edge-paths)](https://packagephobia.now.sh/result?p=edge-paths)
6![Test Edge Paths](https://github.com/shirshak55/edge-paths/workflows/Test%20Edge%20Paths/badge.svg)
7
8Possible paths or binary names of [Edge](https://www.microsoft.com/en-us/edge) in the current platform
9
10### Why?
11
12- Well Documented
13- Well Tested
14- Used by popular players
15- Written with Love <3
16- Fully open sourced
17
18### Usage
19
20- At the moment linux support is only avail for dev channel. Once canary, beta and stable version are release
21 we shall update the package.
22
23###### Javascript
24
25```javascript
26let {
27 getEdgeBetaPath,
28 getEdgeCanaryPath,
29 getEdgeDevPath,
30 getEdgePath,
31 getAnyEdgeStable,
32 getAnyEdgeLatest,
33} = require("edge-paths")
34
35console.log(getEdgeBetaPath())
36console.log(getEdgeCanaryPath())
37console.log(getEdgeDevPath())
38console.log(getEdgePath())
39// console.log(getAnyEdgeStable())
40// console.log(getAnyEdgeLatest())
41```
42
43The output shall look like this according to your installation
44
45```javascript
46// On OSX
47// /Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta
48// /Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary
49// /Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Dev
50// /Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge
51
52// On Windows
53// C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe
54// C:\Program Files (x86)\Microsoft\Edge Canary\Application\msedge.exe
55// C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe
56// C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
57
58// On Linux
59// Beta edge not avail yet
60// Canary not avail
61// /usr/bin/microsoft-edge-dev
62// Stable not avail
63```
64
65###### Typescript
66
67```typescript
68import { getEdgeBetaPath, getEdgeCanaryPath, getEdgeDevPath, getEdgePath } from "edge-paths"
69
70console.log(getEdgeBetaPath())
71console.log(getEdgeCanaryPath())
72console.log(getEdgeDevPath())
73console.log(getEdgePath())
74```
75
76## Installation
77
78[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
79
80```bash
81$ npm install edge-paths
82
83// or
84
85$ yarn add edge-paths
86```
87
88## API
89
90```javascript
91let {
92 getEdgeBetaPath,
93 getEdgeCanaryPath,
94 getEdgeDevPath,
95 getEdgePath,
96 getAnyEdgeStable,
97 getAnyEdgeLatest,
98} = require("edge-paths")
99```
100
101- `getAnyEdgeStable` or `getAnyEdgeLatest` might be more useful if you don't want any specific version.
102
103## Used By
104
105- [devtools](https://www.npmjs.com/package/devtools)
106
107- Please send PR if you are using edge paths. We will be accepting first 10 request.
108
109## License
110
111[MIT License](./LICENSE)
112
113© 2020 Shirshak Bajgain
114
\No newline at end of file