yalc icon indicating copy to clipboard operation
yalc copied to clipboard

Customize package location

Open soanvig opened this issue 6 years ago • 5 comments

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

soanvig avatar Aug 24 '19 20:08 soanvig

not sure what you want to achieve with that

wclr avatar Aug 25 '19 08:08 wclr

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.

soanvig avatar Aug 25 '19 11:08 soanvig

There at least few reasons why ~/.yalc may be a bad directory.

What reasons?

wclr avatar Aug 26 '19 08:08 wclr

Well, not directly bad, but not necessarily wanted for any usage but local development.

  1. 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.
  2. Maybe $HOME is backed up, and I don't want my development packages to be backed up
  3. 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.
  4. There may be some permission issues

I don't know, just storage path configurations seems like an obvious feature to me.

soanvig avatar Aug 26 '19 18:08 soanvig

Ok I've added --store-folder flag option. You may check.

wclr avatar Aug 27 '19 08:08 wclr