# shou

> > 给npm v3的扁平方式瘦身

Latest version **1.0.1** (published 2017-04-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install shou
pnpm add shou
yarn add shou
bun add shou
```

Provides the command `shou`.

## 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.1 |
| Published | 2017-04-26 |
| First published | 2016-04-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | i5ting |
| Maintainers | cnio, i5ting |

## Links

- npm: https://www.npmjs.com/package/shou
- npm.io page: https://npm.io/package/shou

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^2.6.4
- [shelljs](https://npm.io/package/shelljs.md) ^0.7.7
- [user-home](https://npm.io/package/user-home.md) ^2.0.0

## Recent versions

- 1.0.1 (latest) — 2017-04-26
- 0.0.0 — 2016-04-20

## README

# shou

> 给npm v3的扁平方式瘦身


- npm v3是扁平的，把依赖的模块也放到根目录，所以找起来特别费劲。。。
- 其实更多的，你只关系你的package.json的dependency模块
- 比如依赖babel，你的node_modules就要有100多个模块

![](demo.gif)

## 安装

> $ [sudo] npm i -g shou

## 用法

在package.json目录里

> $ shou

## 实现步骤

- 读取pwd下面的package.json
- 获取依赖的，把非依赖的模块都放到node_modules/cache下面
- 创建.npmrc或追加`cache='./node_modules/cache'`
- 将node_modules/cache下面的模块都以软连接的形式放到~/node_modules下面

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