Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates should be able to be overriden #154

Closed
mklabs opened this issue Jan 27, 2013 · 8 comments
Closed

Templates should be able to be overriden #154

mklabs opened this issue Jan 27, 2013 · 8 comments
Labels

Comments

@mklabs
Copy link
Contributor

mklabs commented Jan 27, 2013

Originally posted on the mailing list: https://groups.google.com/forum/#!msg/yeoman-dev/M8M-kqw6S28/1FZ0xbMgBXsJ

The behaviour is not implemented yet but should be.

The idea is that when a generator invoke the .template() method, the system looks first into your project lib/templates/<generator>/<namespace> and use the template it finds instead of the built-in.

For instance, you would be able to override the template used in angular:controller generator by placing a template at lib/templates/angular/controller/controller.js

@ghost ghost assigned mklabs Jan 27, 2013
@addyosmani
Copy link
Member

+1

1 similar comment
@sindresorhus
Copy link
Member

👍

@jiverson
Copy link

jiverson commented Feb 2, 2013

Thanks for adding that +1

@addyosmani
Copy link
Member

I think we should re-investigate whether this is still something we want. If so, let's figure out the work required to get it in place :)

@sindresorhus
Copy link
Member

I think it makes sense to have this. People have preferences. Instead of us supporting everything. Let us please everyone by letting them override with their own crazy stuff.

@ovax3
Copy link

ovax3 commented Sep 12, 2013

+1
As a result it would be useful, when using sub-generators, to see the details of the different steps (e.g. instantiating template xxx into yyy.. etc), and to be able to import a copy of xxx in the local project instance with a simple yo command.

@eddiemonge
Copy link
Member

This can be accomplished using this.src.root.

@eddiemonge
Copy link
Member

Closing as this can be implemented by generator authors and should be up to them. Like I said, you can specify a path to the template files using this.sourceRoot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants