yalc
yalc copied to clipboard
Customize package location
It would be extemely useful for me to customize package location (by --dir switch or something) in both add and publish methods.
In my particular case, I would need that to do some advanced CI jobs. I would like to store yalc packages in directory shared between all my projects. That way I could work with yalc like with private npm repository.
I may implement it in PR if you agree
not sure what you want to achieve with that
Project A has a pipeline, and builds - let's say - the library.
I run yalc publish with --dir /shared (where /shared is alternative to default ~/.yalc).
Project B has dependency to project A, so during pipeline I can run yalc link --dir /shared projectA.
The primary problem though is the uncustomizable packages path. There at least few reasons why ~/.yalc may be a bad directory.
There at least few reasons why ~/.yalc may be a bad directory.
What reasons?
Well, not directly bad, but not necessarily wanted for any usage but local development.
- Maybe I cannot store such data on $HOME, because it may be mounted/unmounted, which I cannot control. Or the other way - I have to store my data on given directory, and it's not $HOME. Which is not that uncommon, to be honest.
- Maybe $HOME is backed up, and I don't want my development packages to be backed up
- Maybe I store 99 of other things like that in some shared directory (which is my case already), and that home location is just well, not for THAT.
- There may be some permission issues
I don't know, just storage path configurations seems like an obvious feature to me.
Ok I've added --store-folder flag option. You may check.