# tinypm

Latest version **1.0.0** (published 2018-01-17) · MIT license · 0 weekly downloads

## Install

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

Provides the command `tinypm`.

## 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 | 2018-01-17 |
| First published | 2018-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | CJ Ting |
| Maintainers | fate-lovely |

## Links

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

## Dependencies (9)

- [axios](https://npm.io/package/axios.md) 0.17.1
- [chalk](https://npm.io/package/chalk.md) ^2.1.0
- [semver](https://npm.io/package/semver.md) ^5.4.1
- [tar-fs](https://npm.io/package/tar-fs.md) ^1.15.3
- [fs-extra](https://npm.io/package/fs-extra.md) ^4.0.1
- [progress](https://npm.io/package/progress.md) ^2.0.0
- [tar-stream](https://npm.io/package/tar-stream.md) ^1.5.4
- [elapsed-time](https://npm.io/package/elapsed-time.md) 0.0.1
- [gunzip-maybe](https://npm.io/package/gunzip-maybe.md) ^1.4.1

## Recent versions

- 1.0.0 (latest) — 2018-01-17

## README

<p align="center">
  <img alt="TinyPM Logo" src="http://ww1.sinaimg.cn/large/9b85365dgy1fnjev4v3j6j208a02q746" />
</p>

<h2 align="center">A tiny nodejs package manager built for fun</h2>

<p align="center">
  <a href="https://mit-license.org/2018">
    <img src="http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square"> 
  </a>
</p>

## Intro

this project is heavily inspired by the awesome post: [Let's Dev: A Package Manager](https://yarnpkg.com/blog/2017/07/11/lets-dev-a-package-manager/) but reimplement it from scratch.

It has a clean code base, add some tests and remove `babel-node` requirement compared to original implementation.

## Usage

just type `tinypm` and you are done 😎.

## Implementation

the whole process is divided into 3 steps implemented in corresponding js files.

1. resolve: read package.json and resolve the whole dependency tree
2. optimize: optimize the dependency tree, try to flat it as much as we can
3. link: download packages and link them to node_modules folder

to speed up the processing, `tinypm` uses `/tmp/.tinypm` as cache dir.

## Notes

as the original implementation, **the binary installation directory is wrong**. 

e.g. if package `A` depends on package `B` which has a binary called `cli-b`, `tinypm` will install `cli-b` to `root/node_modules/.bin/cli-b`, but the correct location is `root/node_modules/A/node_modules/.bin/cli-b`.

## License

Released under the [MIT license](http://mit-license.org/2018)

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