-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.js
30 lines (27 loc) · 1.01 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* @file Entry point for the library. Exposes the external facing function that accepts the input defined in the API documentation.
* @author TheJaredWilcurt
*/
'use strict';
const validation = require('./src/validation.js');
const library = require('./src/library.js');
const { OPTIONS } = require('./api-type-definitions.js');
/**
* Creates OS based shortcuts for files, folders, urls, and applications.
*
* @example
* createDesktopShortcut({
* windows: { filePath: 'C:\\path\\to\\executable.exe' },
* linux: { filePath: '/home/path/to/executable' },
* osx: { filePath: '/home/path/to/executable' }
* });
*
* @param {OPTIONS} options Options object for each OS, and global options
* @return {boolean} True = success, false = failed to create the icon or set its permissions (Linux).
*/
function createDesktopShortcut (options) {
options = validation.validateOptions(options);
let success = library.runCorrectOSs(options);
return success;
}
module.exports = createDesktopShortcut;