update icon indicating copy to clipboard operation
update copied to clipboard

Recursive Updater ?

Open stefanwalther opened this issue 9 years ago • 5 comments

Absolutely fantastic project, can stop using it to consolidate all my projects!!!

One idea I was thinking of:

  • It would be great to apply all updates in a directory (with several projects)
  • Maybe based of an .update.yml file where I can define the updaters defined for this projects
  • Then I could just run something like update --recursive and the based on the current directory all updaters defined in each of the projects would be applied

I started to prototype that a bit and this is what I was actually seeking for for quite some time.

What are your thoughts?

stefanwalther avatar Jul 19 '16 11:07 stefanwalther

Absolutely fantastic project

Thanks! Sorry I just saw this issue.

It would be great to apply all updates in a directory (with several projects)

I did this locally. I created an updater that runs all the updaters on a directory of projects.

Maybe based of an .update.yml

We could add support for that. Currently you can define the updaters on the updaters array in package.json:

{
  "update": {
    "updaters": ["license", "gitignore"]
  }
}

Then I could just run something like update --recursive and the based on the current directory all updaters defined in each of the projects would be applied

I was thinking about this for a while. These are my proposed solutions:

  • we can publish an updater that runs other updaters on a directory
  • any updater can add support for this, by allowing the .src() pattern to be passed on argv/options. But we should formalize a convention for this to make this consistent.

jonschlinkert avatar Jul 27 '16 00:07 jonschlinkert

Yes, that sounds as a good plan. I think one of the important design decisions is, that a developer of an update-lib can choose whether to support being executing by such a recursive updater or not.

stefanwalther avatar Jul 27 '16 19:07 stefanwalther

ping @jonschlinkert any updates on this?

stefanwalther avatar May 30 '18 18:05 stefanwalther

I do indeed have an update :) I created an updater to do this a while ago and wanted to spend some time testing it out. I also created a similar project for generate, which takes an array of names or objects to create a directory of projects.

I have a lot on my plate at the moment, but I'll try to push it up as soon as I get a chance.

jonschlinkert avatar May 30 '18 18:05 jonschlinkert

Sounds encouraging! Let me know if you need help!

stefanwalther avatar May 31 '18 09:05 stefanwalther