@atools/pm

a tiny package manager.

Usage no npm install needed!

<script type="module">
  import atoolsPm from 'https://cdn.skypack.dev/@atools/pm';
</script>

README


pm


💡 Monorepo Tiny Package Manager = Packages + Handles.

You may not need lerna.


About

📦 a tiny package manager.

Quick Start

Step 1

$ npm install -D @atools/pm

Step 2

"scripts": {
  "pm_install": "./node_modules/.bin/pm run install"
}

Advanced Usage

.pmrc.js

const path = require("path");
module.exports = {
  root: path.join(__dirname, "./_fixtures/packages"),
  handles: {
    cmd: {
      beforeExec: function (cmd) {
        if (cmd === "npm i") {
          return "tnpm ii";
        } else if (cmd === "npm uninstall") {
          return "tnpm uninstall";
        }
      },
    },
  },
};

Internal Handles

  • cmd / install
  • cmd / uninstall