Closed janniks closed 3 years ago
Unfortunately, the postinstall
tag only works for packages that are being installed.
i.e. when we use postinstall
in projects that are supposed to be used with basetag
(e.g. project-alice), that postinstall
script is not executed whenever dependencies are installed via npm install
for projects-allice. But rather when somebody installs project-alice as a dependency...
I found an alternative though:
I will try to integrate this into the basetag link
command this week.
Unfortunately, the
postinstall
tag only works for packages that are being installed.
If I have { "postinstall": "npx basetag" }
in my own package.json
, and it works as expected. Every time I run npm install
, npx basetag
runs after, putting the link back in place.
I haven't tried this out yet, but it looks like .hooks/postinstall
is equivalent to package.json.scripts.postinstall
from the description.
Interesting, I thought I tried that earlier. I could swear it doesn't work. Will try again tomorrow
For reference, we continued and resolved this conversation in https://github.com/janniks/basetag/pull/21
I see that #21 was merged into https://github.com/janniks/basetag/tree/add-bin-structure, but that's not yet in master. Is that waiting for something?
Thanks for the ping and sorry for taking so long. I'll look into this tomorrow β haven't had a lot of spare time in the last two weeks, but I should be somewhat free now.
I'll add one more small fix and push a new version tomorrow
I think this looks decent... π¬
I've added
--absolute
flag to override)npx basetag <action>
structure with link
and rebase
so far Deployed via v2.0.0
β @coolaj86 would love to hear your feedback, I think everything should work π
@coolaj86 I released a preview as
2.0.0-beta
Can be tested via npx with the
-p
package specifier: