🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

lnk-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lnk-cli

Create links between files cross-platform

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
438
-0.68%
Maintainers
1
Weekly downloads
 
Created
Source

lnk-cli Build Status Build status Coverage Status XO code style

Create links between files cross-platform

Why

  • Create hard links, directory junctions and symbolic links depending on the platform

Install

$ [sudo] npm install lnk-cli --global

Usage

$ tree
.
└── assets
    ├── favicon.ico
    └── style
        ├── app.css
        └── vendor.css

2 directories, 3 files
$ lnk assets/favicon.ico assets/style dist

# or using bash globs
$ lnk assets/* dist
$ tree
.
├── assets
│   ├── favicon.ico
│   └── style
│       ├── app.css
│       └── vendor.css
└── dist
    ├── favicon.ico              // hard link to assets/favicon.ico
    └── style -> ../assets/style // symlink; directory junction on windows

4 directories, 4 files

Glob support

lnk don't support globbing by itself, for platform independent glob support use globstar:

$ npm install globstar --global

$ globstar -- lnk "assets/*" dist

Please note that Windows needs double quotes, especially if you want to use it in your package.json:

  "scripts": {
    "link-assets": "globstar --node -- lnk \"assets/*\" dist",
  },
  • lnk – API version of this project
  • globstar – if you need glob/globstar support, especially on Windows
  • cpy-cli – if you need to copy multiple files
  • del-cli – if you need to delete files and folders

License

MIT © Michael Mayer

Keywords

link

FAQs

Package last updated on 20 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts