Nondeterministic Programming Methodology

    symlinks

    1.0.0 • Public • Published

    symlinks NPM version NPM monthly downloads NPM total downloads Linux Build Status

    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 ❤️ 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 matched
    • returns {Array}: Returns an array of symbolic links

    Example

    // symlinks.sync(pattern[, options])
    console.log(symlinks.sync('node_modules/*'));

    About

    Contributing

    Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

    Running Tests

    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
    Building docs

    (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.


    1. Globs probably need to be wrapped in quotes or escaped with backticks depending on shell.

    Install

    npm i symlinks

    DownloadsWeekly Downloads

    4

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    9.76 kB

    Total Files

    5

    Last publish

    Collaborators

    • jonschlinkert