Closed tomas-sereikis closed 6 years ago
Because TypeSync does not make any assumptions about what package manager you're using.
For example, yarn
has to update yarn.lock
, npm
updates package-lock.json
.
Additionally, doing typesync && yarn
or typesync && npm install
does the trick nicely without TypeSync having to worry about what package manager you're using. 😃
Does that resolve this issue, or do you think there's something that can be done on TypeSync's side?
well just so you can not use it with post-install scripts because it will give you a infinite loop, install triggers -> typesync that triggers -> install that triggers -> typesync and so on :)
Yeah that's what I was thinking would happen! :D Even so, there's still the case of npm vs yarn.
@tomas-sereikis @jeffijoe
Great package!
We can now use --ignore-scripts
to suppress the postinstall infinite loop.
"scripts": {
"postinstall": "npx typesync && yarn install --ignore-scripts"
}
This may be better if written in README as an example of Tips?
Alternatively, add my original suggestion as a run script 😄
Great package, but why not add the actual install if the dependencies where added and lest say put it under custom flag like
typesync --install
. Because what i would love to do is just to add it in my post install scripts and do not care about it at all.