make-symlinks
Create symbolic link (file symlink) using glob
Install
$ npm install make-symlinks
Usage
const makeSymlinks = ; const patterns = '/home/guntur/dotfiles/*' '!/home/guntur/dotfiles/.git';const path = '/home/guntur/'; ; const symlinks = makeSymlinks;symlinks;
API
patterns
, path
, [options]
)
makeSymlinks(- Params:
- Returns:
<Promise<object>>
- Returns a promise for an array object of symlinks patterns and path.
patterns
, path
, [options]
)
makeSymlinks.sync(- Params:
- Returns:
<Promise<object>>
- Returns an array object of symlinks patterns and path.
Options
See all supported globby
options.
cwd
:<string>
(optional) - The source files to resolve from.- Default:
process.cwd()
- Default:
force
:<boolean>
(optional) - Delete symlink if exists.- Default:
false
- Default:
dryRun
:<boolean>
(optional) - See what would be created symlinks.- Default:
false
- Default:
Example
const options = cwd: processenvHOME dryRun: true; ;
Related
- ln-cli - Create or delete symbolic link using glob on CLI.
- del-symlinks - Delete symlinks using glob.
- get-symlinks - Get all symbolic link (file symlinks) using glob.
License
MIT © Guntur Poetra