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

Pluggable generators #53

Open
cmather opened this issue Sep 2, 2014 · 4 comments
Open

Pluggable generators #53

cmather opened this issue Sep 2, 2014 · 4 comments

Comments

@cmather
Copy link
Contributor

cmather commented Sep 2, 2014

People might want to use slightly different project schemes. This can range from file extensions and whether to include a particular file (e.g. how .em/config.json works now) to also actually changing the structure completely. It might be a link in the config.json to the generator package. Also need a more modular way for handling different file types. For example, currently if I use the harmony package and have app.next.js files, em thinks it should use coffeescript.

@scottmcpherson
Copy link
Contributor

I agree, we definitely need a more modular approach here. The conditional checks in the template's view files are the main reason next.js files are being generated with coffeescript.

It was meant to be more of quick fix than permanent solution and definitely needs a more modular design.

Ideally, I'm thinking it would be nice if the supported extensions were directly dependent upon the templates that exist in templates directory. So going back to next.js, for the view generator, all we would have to do to support next.js is create a directory and a template file for that extension. For example, iron/lib/templates/views/next.js/view.next.js.ejs or something along those lines. If we went this route, we could just make the writeTemplate() function smart enough to map the provided extension to the correct directory and template.

@ianserlin
Copy link

+1

2 similar comments
@fakenickels
Copy link

+1

@maka-io
Copy link
Contributor

maka-io commented Jan 13, 2016

+1

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

No branches or pull requests

5 participants