Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

How to use my own templates? #273

Closed
Narretz opened this issue Jul 10, 2013 · 7 comments
Closed

How to use my own templates? #273

Narretz opened this issue Jul 10, 2013 · 7 comments

Comments

@Narretz
Copy link

Narretz commented Jul 10, 2013

When I generate e.g. angular:controller, I want to use my own template.for example, I want to change how the dependencies are formatted. Is there an easy way to do this? Maybe an option that points to a path with a compatible template? Or is this in essence a new generator?
I realize this is not a generator-angular specific question, but the yeoman docs only seem to refer to templates when building a completely new generator.

@eddiemonge
Copy link
Member

what exactly are you talking about? Do you mean views in the angular app? or completely different files for the js controller code?

@AdamQuadmon
Copy link

I think that you should put hands on generator angular itself to do what you want to do... maybe you need only to override a specific generator (for controllers, or service or myWhateverGenerator).
this way you still benefit from generatror-angular only care about new stuffs

@addyosmani
Copy link
Member

This is something you could easily do by forking the Angular generator and customising per your needs. I'm not sure prompting for templates is in enough demand to justify an extra step for all users.

@Narretz
Copy link
Author

Narretz commented Jul 17, 2013

Ah, okay, thanks. So there's no way to configure the generator to use a different folder for the templates? I wouldn't want to tell the gen which templates to use when I run it, but before.
Forking the generator is probably the fastest way.

@btford
Copy link
Contributor

btford commented Jul 18, 2013

I'm not sure prompting for templates is in enough demand to justify an extra step for all users.

+1

@eddiemonge
Copy link
Member

@Narretz are you merely trying to change the format of the dependencies to make them min-safe? the existing templates are pretty lite as is. can you describe your use case some more?

@sindresorhus
Copy link
Member

See yeoman/generator#154

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

No branches or pull requests

6 participants