All Projects → g-plane → Tiny Package Manager

g-plane / Tiny Package Manager

Licence: mit
Learn how npm or Yarn v1 works.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Tiny Package Manager

Ni
💡 Use the right package manager
Stars: ✭ 179 (+43.2%)
Mutual labels:  npm, package-manager, yarn
Tbify
使用淘宝镜像运行命令: tbify [nvm|npm|npx|yarn|pnpm|...]
Stars: ✭ 153 (+22.4%)
Mutual labels:  npm, package-manager, yarn
Bolt
⚡️ Super-powered JavaScript project management
Stars: ✭ 2,134 (+1607.2%)
Mutual labels:  npm, package-manager, yarn
Website
Yarn package manager website
Stars: ✭ 374 (+199.2%)
Mutual labels:  npm, package-manager, yarn
Npminstall
Make `npm install` fast and easy.
Stars: ✭ 374 (+199.2%)
Mutual labels:  npm, package-manager, yarn
Benchmarks Of Javascript Package Managers
Benchmarks of JavaScript Package Managers
Stars: ✭ 388 (+210.4%)
Mutual labels:  npm, package-manager, yarn
Awesome Npm
Awesome npm resources and tips
Stars: ✭ 3,894 (+3015.2%)
Mutual labels:  npm, package-manager, yarn
Yarn
The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
Stars: ✭ 40,325 (+32160%)
Mutual labels:  npm, package-manager, yarn
React Use Api
Async HTTP request data for axios. Designed for diverse UI states, SSR and data pre-caching.
Stars: ✭ 49 (-60.8%)
Mutual labels:  npm, yarn
Npm Git Install
Clones and (re)installs packages from remote git repos. See npm/npm#3055
Stars: ✭ 49 (-60.8%)
Mutual labels:  npm, package-manager
Pnpm
Fast, disk space efficient package manager -- 快速的,节省磁盘空间的包管理工具
Stars: ✭ 14,219 (+11275.2%)
Mutual labels:  npm, package-manager
Tsdx
Zero-config CLI for TypeScript package development
Stars: ✭ 9,010 (+7108%)
Mutual labels:  npm, yarn
Actions Package Update
keeps npm dependencies up-to-date by making pull requests from GitHub Actions or CI.
Stars: ✭ 36 (-71.2%)
Mutual labels:  npm, yarn
Gitpkg
use a sub directory of a github repo as yarn / npm dependency directly
Stars: ✭ 54 (-56.8%)
Mutual labels:  npm, yarn
Mailgo
💌 mailgo, a new concept of mailto and tel links
Stars: ✭ 978 (+682.4%)
Mutual labels:  npm, yarn
Yarn.msbuild
MSBuild integration for the Yarn package manager.
Stars: ✭ 57 (-54.4%)
Mutual labels:  npm, yarn
Package.json
文件 package.json 的说明文档。
Stars: ✭ 67 (-46.4%)
Mutual labels:  npm, yarn
Typac
install npm packages along with corresponding typings
Stars: ✭ 29 (-76.8%)
Mutual labels:  npm, yarn
Floatsidebar.js
Lightweight (2kb gzipped), zero-dependency javascript library for making float sidebars based on the finite state machine
Stars: ✭ 56 (-55.2%)
Mutual labels:  npm, yarn
Have It
The fastest NPM install does nothing because you already have it
Stars: ✭ 75 (-40%)
Mutual labels:  npm, yarn

Tiny Package Manager

A very very simple demo and guide for explaining package manager.

Introduction

As a JavaScript developer, you may use package manager like npm or Yarn frequently.

However, do you know how a package manager works? Or, you may be curious about how to build a package manager.

Well, the purpose of this guide is not to let you re-invent a new wheel. There is no need to do that because both npm and Yarn are mature and stable enough. The purpose is just to explain how a package manager works under the hood. You can read the code, and the comments will explain how it works.

Note: To simplify the guide and make it as simple as possible, this demo doesn't handle some edge cases and catch errors and exceptions. If you are really curious about that, it's recommended to read the source code of npm or Yarn.

Features

  • [x] Download packages to node_modules directory.
  • [x] Simple CLI.
  • [x] Simply resolve dependency conflicts.
  • [x] Flatten dependencies tree.
  • [x] Support lock file. (Like yarn.lock or package-lock.json)
  • [x] Add a new package through CLI. (Like yarn add or npm i <package> command)
  • [ ] Run lifecycle scripts. (preinstall and postinstall)
  • [ ] Symlink the bin files.

How to start?

Read the source code in the src directory. You can read the src/index.ts file in the beginning.

If you would like to try this simple package manager, just install it globally:

Via Yarn:

$ yarn global add tiny-package-manager

Via npm:

$ npm i -g tiny-package-manager

Then just go to a directory which contains valid package.json and run:

$ tiny-pm

License

MIT License (c) 2018-present Pig Fang

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].