Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

mrpm

2.0.2 • Public • Published

mrpm

npm npm npm npm npm npm Build Status Greenkeeper badge

MonoRepo Package Manager.
This is the CLI tool that runs the npm command for each monorepo projects.

Inspired by mariuslundgard/monorepo.

Why?

It was created to execute a simple npm command in order of dependencies.

Usage

install

npm i -D mrpm

Example of dir & package.json

pkgroot
+--packages
|  +--subpkg1
|  |  `--package.json
|  `--subpkg2
|     `--package.json
`--package.json

pkgroot/package.json

{
  //...
  "private": true,
  //...
  "scripts": {
    "test": "mrpm run test",
    "build": "mrpm run build",
    //...
  },
  //...
}

pkgroot/packages/subpkg1/package.json or
pkgroot/packages/subpkg2/package.json

{
  // If `private` is set to `true`, it will be excluded from `publish`
  // "private": true,
  //...
  "scripts": {
    "test": "...",
    "build": "...",
    //...
  },
  //...
}

Example of commands

  • npm install for each monorepo projects.
mrpm install
  • npm update for each monorepo projects.
mrpm update
  • npm publish for each monorepo projects.
mrpm publish
  • npm run script for each monorepo projects.
mrpm run xxx
  • npm prune for each monorepo projects.
mrpm prune

Example of Deploy with Travis CI.

files

  • package.json
  • .travis.yml
  • deploy.sh

package.json

{
  //...
  "private": true,
  //...
  "scripts": {
    //...
    "publish:all": "mrpm publish",
    //...
  },
  "devDependencies": {
    "mrpm": "x.x.x"
  }
}

.travis.yml

language: node_js
node_js:
  - "node"
 
deploy:
  provider: script
  script: sh $TRAVIS_BUILD_DIR/deploy.sh

deploy.sh

#!/usr/bin/env bash 
 
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
npm run publish:all

Install

npm i mrpm

DownloadsWeekly Downloads

26

Version

2.0.2

License

MIT

Unpacked Size

18.7 kB

Total Files

15

Last publish

Collaborators

  • avatar