Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mac-hardlink

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mac-hardlink - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

yarn.lock

31

bin/hardlink.js

@@ -6,7 +6,7 @@ #!/usr/bin/env node

const unlinkOnly = _.find(process.argv, '-u');
const source = process.argv[2];
const dest = process.argv[3];
const u = process.argv[4];
let npmignoreLines;
let npmignoreLines = [];
const blacklist = ['node_modules', '.git', '.github', '.gradle', 'package.json', '.gitignore', '.npmignore', '.idea'];

@@ -36,3 +36,7 @@

function getNpmIgnore() {
const content = _.trim(fs.readFileSync(`${source}/.npmignore`));
const npmignorePath = `${source}/.npmignore`;
if (!fs.existsSync(npmignorePath)) {
return [];
}
const content = _.trim(fs.readFileSync(npmignorePath));
return _.split(content, '\n');

@@ -77,3 +81,3 @@ }

unhardlink(destFullPath);
if (u) {
if (unlinkOnly) {
console.log(`unlinking ${destFullPath}`);

@@ -89,6 +93,23 @@ return;

function showHelp() {
if (_.find(process.argv, '-h')) {
console.log(`mac-hardlinks \
usage:
hardlink [src] [dest] : link from src to dest \
hardlink [src] -u : unlink src`);
return true;
} else {
return false;
}
}
function run() {
if (showHelp()) {
return;
}
assertSourceExists();
ensureHLN();
ensureDestExists();
if (!unlinkOnly) {
ensureDestExists();
}
npmignoreLines = getNpmIgnore();

@@ -95,0 +116,0 @@ hardlinkRecursively();

2

package.json
{
"name": "mac-hardlink",
"version": "1.0.1",
"version": "1.0.2",
"description": "Hardlinks on macOS",

@@ -5,0 +5,0 @@ "author": "Daniel Zlotin <zlotindaniel@gmail.com>",

# Hardlinks on macOS
## Installation
`npm i -g mac-hardlink`
## Usage
`hardlink <src-dir> <dest-dir>`
or to unlink:
`hardlink <src-dir> <dest-dir> u`
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc