How to use the @lerna/cli.command function in @lerna/cli

To help you get started, we’ve selected a few @lerna/cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alan-agius4 / ng-mono-repo-starter / tools / tasks / release.ts View on Github external
const modulePath = resolve("./node_modules/@lerna/npm-publish/npm-publish.js");
const cachedModuleExports = require("module")._cache[modulePath].exports;

// just monkey-patching npmPack is not enough or even useful -- that API is not used directly,
// it is only used through makePacker
cachedModuleExports.npmPack = npmPack;

// original redundantly specifies opts here
// passing no opts will cause originalNpmPack to create opts = makePackOptions(rootManifest)
// which is what we want
cachedModuleExports.makePacker = (rootManifest: any) => (packages: Package[]) => npmPack(rootManifest, packages);

process.argv.splice(0, 2, "publish");

const publishCmd = require("@lerna/publish/command");
require("@lerna/cli")()
	.command(publishCmd)
	.parse(process.argv);
github cormacrelf / angular-skyhook / tools / tasks / release.ts View on Github external
const modulePath = resolve("./node_modules/@lerna/npm-publish/npm-publish.js");
const cachedModuleExports = require("module")._cache[modulePath].exports;

// just monkey-patching npmPack is not enough or even useful -- that API is not used directly,
// it is only used through makePacker
cachedModuleExports.npmPack = npmPack;

// original redundantly specifies opts here
// passing no opts will cause originalNpmPack to create opts = makePackOptions(rootManifest)
// which is what we want
cachedModuleExports.makePacker = (rootManifest: any) => (packages: Package[]) => npmPack(rootManifest, packages);

process.argv.splice(0, 2, "publish");

const publishCmd = require("@lerna/publish/command");
require("@lerna/cli")()
	.command(publishCmd)
	.parse(process.argv);

@lerna/cli

Lerna's CLI

MIT
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis

Popular @lerna/cli functions