How to use @lerna/publish - 1 common examples

To help you get started, we’ve selected a few @lerna/publish 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 telus / tds-core / scripts / prePr.js View on Github external
const argv = require('yargs').argv

const chalk = require('chalk')
const emoji = require('node-emoji')

const { PublishCommand } = require('@lerna/publish')

/*
  Adapted from:

  * https://github.com/lerna/lerna/blob/v2.10.1/src/Command.js#L213-L216
  * https://github.com/lerna/lerna/blob/v2.10.1/src/commands/PublishCommand.js#L24
  *
  * WARNING! This interface is changing in lerna v3 and will need to be updated when we upgrade lerna.
*/
const publishCommand = new PublishCommand(argv._, argv, argv._cwd)
publishCommand.configureLogging()
publishCommand.runValidations()
publishCommand.runPreparations()

publishCommand.initialize(() => {
  console.log(
    `\r\n${emoji.get(
      'thinking_face'
    )} If this is not what you expected, ensure that your commit messages follow the Conventional Commits specification (${chalk.underline(
      'https://conventionalcommits.org'
    )}) and try again.`
  )
  console.log(
    `\r\n${emoji.get(
      'rocket'
    )} Please paste the entire output of this task into the body of your Pull Request so that a maintainer can verify before merging/publishing.`

@lerna/publish

Publish packages in the current project

MIT
Latest version published 23 days ago

Package Health Score

98 / 100
Full package analysis

Popular @lerna/publish functions