Skip to content

feature: customizing templates #5

Open
@jonschlinkert

Description

@jonschlinkert

Generate makes it easy to override templates in general (by adding a custom template to the ~/templates directory).

I'd like to come up with a convention for easily extending templates as well. e.g. since package.json is an object, we should be able to find a way to allow users to customize the templates used in this generator, without having to overwrite them completely.

Here are a couple of ideas for solutions:

  1. Instead of loading all of the templates using app.src(), we can load them onto a template collection so that when this generator is used as a plugin, you would be able to get the template and modify it, or extend it and create a new one based on it.
  2. Support adding custom data to a specific property on app.cache.data. Then when we can just merge that object onto the template before rendering.

Any other ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions