symlinks
v1.0.0
Published
Glob symlinks, async or sync. API and CLI. CLI also has `--del` for deleting matching symlinks.
Downloads
15
Maintainers
Readme
symlinks
Glob symlinks, async or sync. API and CLI. CLI also has
--del
for deleting matching symlinks.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install
Install with npm:
$ npm install --save symlinks
CLI Usage
Get a list of symlinks that match a glob pattern[1].
Examples
# symlinks <pattern> [options]
$ symlinks "node_modules/*"
$ symlinks "node_modules/*" -d
$ symlinks "node_modules/*" -c
$ symlinks "node_modules/*" -g
$ symlinks "node_modules/*" -gd
$ symlinks "node_modules/*" -gc
CLI Options
| Flag | Description |
| --- | --- |
| -d
, --delete
| Delete matching symlinks |
| -g
, --global
| Match symlinks in NPM's global directory |
| -c
, --clean
| Delete symlinks that do not resolve to a realpath |
Delete
Delete matching[1] symlinks with --del
:
$ symlinks "node_modules/*" --del
API Usage
Params
patterns
{String|Array}: One or more glob patterns for matching symlinks.- {Object}: Options to pass to matched.
- {Function}
Example
// symlinks(pattern[, options, callback])
symlinks('node_modules/*')
.then(links => console.log('SYMLINKS:', links))
.catch(console.error);
.sync
Synchronous version, returns an array of symlinks that match the given glob pattern.
Params
patterns
{String|Array}options
{Object}: Options to pass to matchedreturns
{Array}: Returns an array of symbolic links
Example
// symlinks.sync(pattern[, options])
console.log(symlinks.sync('node_modules/*'));
About
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Author
Jon Schlinkert
License
Copyright © 2018, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on August 09, 2018.