Socket
Socket
Sign inDemoInstall

bin-links

Package Overview
Dependencies
29
Maintainers
3
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bin-links

JavaScript package binary linker


Version published
Maintainers
3
Install size
1.04 MB
Created

Package description

What is bin-links?

The bin-links npm package is a module that is responsible for linking binary files and commands for npm packages. It handles the creation of symlinks for executable files to the .bin directory within the node_modules folder or the global bin directory when a package is installed. This allows users to execute the binaries provided by the installed packages directly from the command line.

What are bin-links's main functionalities?

Linking Binaries

This feature allows the bin-links package to create symlinks for the binaries specified in the package.json file of a node module. The code sample demonstrates how to use bin-links to link binaries for a local package installation.

const binLinks = require('bin-links');

binLinks({
  path: '/path/to/package',
  pkg: { bin: { 'my-binary': './cli.js' } },
  global: false,
  force: true
}).then(() => {
  console.log('Binaries linked successfully.');
}).catch((err) => {
  console.error('Error linking binaries:', err);
});

Linking Global Binaries

This feature is similar to the previous one but is used for linking binaries globally. When the 'global' option is set to true, the binaries are linked in the global bin directory, making them accessible from anywhere in the system.

const binLinks = require('bin-links');

binLinks({
  path: '/path/to/package',
  pkg: { bin: { 'my-binary': './cli.js' } },
  global: true,
  force: true
}).then(() => {
  console.log('Global binaries linked successfully.');
}).catch((err) => {
  console.error('Error linking global binaries:', err);
});

Other packages similar to bin-links

Changelog

Source

1.1.2 (2018-03-22)

Bug Fixes

  • linkMans: return the promise! (5eccc7f)

<a name="1.1.1"></a>

Readme

Source

bin-links is a standalone library that links binaries and man pages for Javascript packages

Install

$ npm install bin-links

Table of Contents

Example

// todo

Features

  • Links bin files listed under the bin property of pkg to the node_modules/.bin directory of the installing environment.
  • Links man files listed under the man property of pkg to the share/man directory of the provided optional directory prefix.

Contributing

The npm team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The Contributor Guide has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.

API

> binLinks(pkg, folder, global, opts, cb)
Example
binLinks(pkg, folder, global, opts, cb)

Keywords

FAQs

Last updated on 22 Mar 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc