# node-nosync

> Prevent 'node_modules' from sync to iCloud

Latest version **1.0.0** (published 2021-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-nosync
pnpm add node-nosync
yarn add node-nosync
bun add node-nosync
```

Provides the command `nosync`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-03-03 |
| First published | 2021-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aiello Chan |
| Maintainers | aiellochan |
| Keywords | iCloud, nosync, node_modules, 同步 |

## Links

- npm: https://www.npmjs.com/package/node-nosync
- Repository: https://github.com/AielloChan/node-nosync
- Issues: https://github.com/AielloChan/node-nosync/issues
- npm.io page: https://npm.io/package/node-nosync

## Recent versions

- 1.0.0 (latest) — 2021-03-03

## README

# Node Nosync

防止 `node_modules` 同步到 iCloud 中。

## 原理

iCloud 不会同步以 `.nosync` 结尾的文件以及文件夹。

将 `node_modules` 重命名为 `node_modules.nosync`，然后创建一个软链 `node_modules` 指向 `node_modules.nosync` 即可实现。

## 使用

安装

```bash
npm i -g node-nosync
# or
yarn global add node-nosync
```

然后在 `node_modules` 同级目录下执行 `nosync`，即可。

本工具启发自 [nosync-icloud](https://github.com/HaoChuan9421/nosync-icloud#readme)，但是将其极简化，一个工具只做一件事。

## 建议的使用方法

将其放到你的 `package.json` 中 `postinstall` 脚本内，像下面这样
```json
{
    "script": {
        "postinstall": "nosync"
    }
}
```

---
_Source: https://npm.io/package/node-nosync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
