Skip to content

Commit 4c71b11

Browse files
npm audit fix and README updates (#52)
* npm audit fix * Update documentation
1 parent cd06fd0 commit 4c71b11

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const shortcutsCreated = createDesktopShortcut({
7474
windows: {
7575
// REQUIRED: Path must exist
7676
filePath: 'C:\\path\\to\\executable.exe',
77-
// OPTIONAL: Defaults to the Desktop of the current user
77+
// OPTIONAL: Defaults to the Desktop of the current user (by asking Windows specifically where it is located)
7878
outputPath: 'C:\\some\\folder',
7979
// OPTIONAL: defaults to the filePath file's name (without the extension)
8080
name: 'My App Name',
@@ -143,7 +143,7 @@ Key | Type | Allowed | Default | Description
143143
Key | Type | Allowed | Default | Description
144144
:-- | :-- | :-- | :-- | :--
145145
`filePath` | String | Any valid path or URL | **This is a required field** | This is the target the shortcut points to.
146-
`outputPath` | String | Any valid path to a folder | `'%USERPROFILE%\\Desktop'` | Path where the shortcut will be placed.
146+
`outputPath` | String | Any valid path to a folder | See description. | Path where the shortcut will be placed. The default value is determined by using PowerShell to ask Windows specifically where the User's desktop is located. If PowerShell is not available we default to `'%USERPROFILE%\\Desktop'`. This means it supports One Drive accounts, and other oddball setups, too.
147147
`name` | String | Any file system safe string | Uses name from filePath | The name of the shortcut file.
148148
`comment` | String | Any string | Not used if not supplied | Metadata file "comment" property. Description of what the shortcut would open.
149149
`icon` | String | Valid path to file (ICO, EXE, or DLL) | Uses OS default icon | The image shown on the shortcut icon. You can also pass in an index if file contains multiple icons, like `'C:\\file.exe,0'`
@@ -257,6 +257,7 @@ Parts of the `windows.vbs` were copied/modified based on:
257257
* Offer an async and sync mode, instead of just sync.
258258
* Note: Make sure it can still run in older versions of NW.js
259259
* Help with any of the known issues listed below:
260+
* This repo is written using `require` for imports. I would endorse anyone that wants to create a fork of this repo written in ESM that drops support for older Node versions and is written with async support (maybe promises?). Maybe call it `create-desktop-shortcuts-esm` or something.
260261

261262

262263
* * *

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)