Open zanerock opened 2 years ago
In the docs, it says that yalc push is an alias for yalc publish --push. Except the latter will invoke npm 'prepublishOnly' (and pepare, prepublish, etc.) while the latter does not.
yalc push
yalc publish --push
In package.json define a prepublishOnly action:
package.json
prepublishOnly
{ ..., "scripts": { "prepublishOnly": "echo -e "\nHi!\n" }, ... }
Now you should see:
$ yalc publish --push Hi! @foo/bar@1.0.0-beta.93 published in store. Pushing @foo/bar@1.0.0-beta.93 in /Users/joe/.liq/playground/foo/baz
but
$ yalc push @foo/bar@1.0.0-beta.93 published in store. Pushing @foo/bar@1.0.0-beta.93 in /Users/joe/.liq/playground/foo/baz
yalc push should behave the same / call the same internal method as yalc publish --push
Overview
In the docs, it says that
yalc push
is an alias foryalc publish --push
. Except the latter will invoke npm 'prepublishOnly' (and pepare, prepublish, etc.) while the latter does not.To reproduce
In
package.json
define aprepublishOnly
action:Now you should see:
but
Solution
yalc push
should behave the same / call the same internal method asyalc publish --push