uber / uber-ngen

uber-ngen is a tool that will generate a new nodejs project for you.
MIT License
43 stars 10 forks source link

allow partial updates of templates / files #13

Open Raynos opened 10 years ago

Raynos commented 10 years ago

whenever we change uber-ngen it's hard to update everything that was generated.

Here's a concept of how to do this

  1. Add a ngen-version field in the package.json that's scaffolded that marks the version of ngen used to generate this project
  2. Add a uber-ngen update command that updates an existing project to the latest version of the ngen scaffolder
    1. generates a patch of all changes that are in the project currently on top of the scaffolded files
    2. creates the new files
    3. re-applies the patch on top of the new scaffolded files
    4. ask the user to fix the merge conflicts.

To start we should add the ngen-version to the package.json

dfellis commented 10 years ago

Should we call it ngen-version or uber-ngen-version? We are kind of co-opting an already-existing library's namespace with the former.

The rest looks fine to me, except it should also automatically create a branch to apply the patch onto, so it's easy for the user to turn it into a PR/arc diff thing?

Raynos commented 10 years ago

good idea.

terinjokes commented 10 years ago

This is the biggest thing I'm looking for when looking at generators and scaffolding: with a ton of modules, we don't want to be stuck with manually updating them to new scaffolding versions.

@Raynos: has the version field been added, even if the diff part has not?

Raynos commented 10 years ago

@terinjokes yes the version field is in