tiny-package-manager

Learn how npm or Yarn v1 works.
授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 滕学义
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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 Yarnfrequently.

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

  • Download packages to node_modules directory.
  • Simple CLI.
  • Simply resolve dependency conflicts.
  • Flatten dependencies tree.
  • Support lock file. (Like yarn.lock or package-lock.json)
  • 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

  • 1.CentOS7在安装mha-manager时报依赖关系的错,Requires: perl(:MODULE_COMPAT_5.10.1),现存的yum无法安装perl解决依赖关系 [root@mha-m ~]# yum install -y mha4mysql-manager-0.58-0.el7.centos.noarch.rpm Loaded plugins: fastestmirror

  • Tiny Linux which has its own package manager called "tce-load". There's a list of packages for it here: http://distro.ibiblio.org/tinycorelinux/tcz_2x.html There's everything that's needed to make or

  • 首先附上一个在线项目的package.json文件代码,下面我们将一一介绍一下各个模块的功能 { "name": "Admin",//项目名称 "version": "1.7.6", //版本号 "description": "A Vue.js project", //项目的描述 "author": "lhui609@163.com", //作者 "private": true

 相关资料
  • Tiny Tiny RSS是一个基于Web的RSS/Atom新闻聚合器。它的UI基于Ajax技术开发所以看起非常像一个桌面应用程序。 特性 服务器端 AJAX 驱动的应用程序,用户只需要一个浏览器 根据 GPLv3 许可开源 自托管:控制你自己的数据并保护你的隐私,而不依赖云服务 支持插件和主题 检测和过滤重复的文章 基于 JSON 的 API

  • Live example This example shows you how to use Tiny Drive for your file and image management. For more information on the Tiny Drive plugin, see the docs.TinyMCE HTML JS <h2>The world's first rich te

  • Tiny ERP (现已改名为:OpenERP) 系统是一款非常适合中小型企业的灵活强大的开源ERP系统。它的许多非常优秀的特性与当前的某些昂贵的ERP产品不相伯仲甚至更为出色,而其开源的 特点也必将吸引更多的开发者和用户的关注。Tiny ERP目前的开发速度惊人,不断有非常实用、灵活方便的模块推出。

  • tiny-您的图片实时优化专家 现今的各类应用中,图片的使用越来越多,而且移动设备的各类高清屏,图片质量的要求也越来越高,在网站上图片类的使用带宽已基本达到60%,如果能减少图片的带宽占用,能更好的提升用户体验以及节约成本。 随着接入终端的种类繁多,以往一张图片所有终端使用的暴力做法已跟不上潮流,我更倾向于不同的终端选择更适合的图片(尺寸、质量甚至于更优的图片格式),Tiny主要用于对图片做压缩或

  • node.js下的一个非常简单的非关系型数据库,适合数据量不大,数据结构简单的数据存储。理论上,任何可以用json来保存的数据都可以用tiny来保存。 node.js可以使用的数据库很多,但对于很多简单的数据存储,mongodb、MySQL就有些大材小用了,更主要的是麻烦。于是便有了node-tiny,一个非关系型的数据库,有点类似于mongodb。 tiny的文档中讲述了这样一个事实,当我们在数

  • TencentOS tiny 是腾讯面向物联网领域开发的实时操作系统,具有低功耗,低资源占用,模块化,安全可靠等特点,可有效提升物联网终端产品开发效率。TencentOS tiny 提供精简的 RTOS 内核,内核组件可裁剪可配置,可快速移植到多种主流 MCU (如 STM32 全系列)及模组芯片上。而且,基于 RTOS 内核提供了丰富的物联网组件,内部集成主流物联网协议栈(如 CoAP/MQTT