Linking Binaries
This feature allows you to link all binaries from the node_modules/.bin directory to a specified destination directory. This is useful for making executables available in a consistent location.
const { linkBins } = require('@pnpm/link-bins');
const path = require('path');
const sourceDir = path.join(__dirname, 'node_modules/.bin');
const destDir = path.join(__dirname, 'bin');
linkBins(sourceDir, destDir).then(() => {
console.log('Binaries linked successfully');
}).catch(err => {
console.error('Error linking binaries:', err);
});