question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to override the 'npm publish' command?

See original GitHub issue

Let’s say we have a custom a npm package publishing workflow which replaces npm publish.

If we still want to use lerna on top of this workflow, is this possible currently to replace npm publish with a different command? If not, would you be open to a PR for this?

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
evocateurcommented, Jun 8, 2017

You could conceivably chain some lerna exec calls, I suppose.

# bump versions in changed packages, create tag(s) and push to remote
lerna publish --skip-npm
# create ${packageName}-v${version}.tgz file in each package
lerna exec -- npm pack
# run a command to upload that tgz to tarball repository
lerna exec -- rsync *.tgz <destination>

npm pack is run during the npm publish process.

0reactions
lock[bot]commented, Apr 3, 2019

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a workaround for `npm publish -f` - Stack Overflow
Once a package is unpublished, it cannot be republished. If you've unpublished a package by mistake, we'd recommend publishing again under a different...
Read more >
npm-publish - npm Docs
By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a scope...
Read more >
npm-publish - npm Docs
Publish a package. ... This can be overridden by specifying a different default registry or using a scope in the name (see package.json...
Read more >
Unpublishing packages from the registry - npm Docs
As a package owner or collaborator, if your package has no dependents, you can permanently remove it from the npm registry by using...
Read more >
Updating your published package version number - npm Docs
To change the version number in package.json , on the command line, in the package root directory, run the following command, replacing <update_type>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found