6.0.1 • Published 4 years ago

@seangenabe/shadow v6.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

shadow

npm Build Status Coveralls Dependency Status devDependency Status node

Glob files and copy/symlink/hardlink in another directory.

Usage

import { shadow } from "@seangenabe/shadow"

shadow(pattern, dest, opts)

Globs the current directory (opts.cwd || process.cwd()) and copies, symlinks, or hardlinks the globbed files with the globbed folder structure into dest.

Parameters:

  • pattern - array | string - One or more glob patterns to select the files to link
  • dest - the destination directory
  • opts - options to pass to globby
    • copyMode - 'symlink' | 'link' - Symlink or hardlink the files. If unspecified, will simply copy the files.
    • fallback - Fall back to copying if there aren't enough permissions to symlink or hardlink (EPERM).

Returns a promise that resolves when all files have been hardlinked.

CLI

shadow <cwd> <dest> [pattern = **]

Options:

  • cwd, dest, pattern - same as above
  • -m --mode - symlink or hardlink the file
  • -f --fallback - fall back to copying the file on EPERM

What happened to hardlink?

This package is modified from hardlink's code and is a superset of its functionality.

Related

License

MIT

6.0.1

4 years ago

6.0.0

4 years ago

5.0.3

5 years ago

5.0.2

5 years ago

5.0.1

5 years ago

5.0.0

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago