- run
npm install -g enhanced-publish
- use npx to run and execute the package
The package is a command line tool that can be used to publish your package to npm. It works exactly like npm publish but it also allows you to specify to only publish the package if there is no version conflict.
The behavior is heavily inspired by lerna's from-package publishing strategy.
The command adds a flag --if-possible
to the npm publish
command and will not publish if the package already exists in the registry.
Will use the 'preid' as the tag. 1.0.0-alpha.1
becomes --tag alpha
in the publish command.