0.1.4 • Published 8 months ago

lopkg v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

lopkg

local package installer.

lopkg is a solution to a problem with different package managers existing throughout systems. corepack is one solution but it's a systemwide solution and has hardly worked properly for me, so this is a simpler version of corepack.

lopkg installs the requested package manager to be installed into the project folder. You can then use this aliased version in the project as needed.

Usage

  1. add the following lines to your package.json
{
  "scripts": {
    "boot": "npx lopkg", //=> install the latest pnpm by default
    "pm": "node pm.cjs"
  }
}
  1. Add the following to your .gitignore
/pm.cjs
/pmx.cjs
  1. Now run the boot script to create the pm.cjs and pmx.cjs(not created for all package managers) files.
$ npm run boot
  1. You are all done, you just use npm run pm instead of yarn or pnpm, or you could even use yarn pm or pnpm pm if that's shorter and more tied to your muscle memory since the executed package manager is always going to be the one that's in the repository.

CLI Reference

  Description
    Install a project specific package manager

  Usage
    $ lopkg [pkgman] [version] [options]

  Options
    -v, --version    Displays current version
    -h, --help       Displays this message

  Examples
    $ lopkg yarn
    $ lopkg pnpm
    $ lopkg pnpm 8.6.2

License

MIT

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago