link-bins

v0.0.5arrow_drop_down
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
371
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
35 KB
creates the node_modules .bin directory
1 contributor
Install link-bins as a package?
Copied
npm i @bit/bit.packages.link-bins
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
chevron_left
chevron_right

link-bins

Given a node_modules folder and a list of nested cwds and their package.json bin executables, will link those executables in the .bin directory of the node_modules folder

Usage

const { linkBins } = require('@bit/bit.packages.link-bins')

async function main () {
  const bins = {
    '/tmp/foo/node_modules/package1': {
      bin: './folder/foo.js'
    },
    '/tmp/foo/node_modules/package2': {
      bin: {
        bar: 'bar.js',
        baz: 'folder/baz.js'
      }
    }
  }
  await linkBins(bins)
  console.log('All symlinks created!')
}

main()
Help and resources