Skip to content

is coffee supported ? #214

Closed
Asp3ctus opened this Issue Oct 7, 2012 · 9 comments

5 participants

@Asp3ctus
Asp3ctus commented Oct 7, 2012

Hi ...
i wanna give geddy a try ..... but it looks like i can't use coffee script to write my app ...
in generators and stuff ...

Did i get it right ?

thanks

PS: i mean like geddy app Test --coffee

@Techwraith

We don't currently have generators for it, but we do support coffeescript based apps. You'll just have to transition the generated app from js to coffeescript on your own.

We'd definitely take a pull request that added that functionality to the generators though.

@polotek
@Techwraith
@MiguelMadero

I think it would be better to add a parameter to specify the folder to get the templates from instead of making it language specific. This way we could later have a version that includes, let's say LESS, SASS, different layouts, not use twitter bootstrap, etc.

The switch will default to (geddydir)/templates. Then you could git clone any template project and run $ geddy app myapp -templates $/geddycstemplates.
Also it would be nice to add a setting in config so running other generators will always use the same templates and to make it easier to share this with other devs without them having to clone the same templates we could include them in the app's root by default.

@Asp3ctus if you want to build the CS templates I can give you a hand to add the switch so the geddy executable will use templates located somewhere else. An easy way to test this now is to replace the files in the template folder (by default in Linux it's on /usr/local/lib/node_modules/gedddy/templates).

What does everyone else thinks?

@Techwraith

@MiguelMadero I like the idea of custom generators. I can already think of a few uses for this kind of thing. I'm not too opinionated about the API for this kind of thing, as long as its intuitive. Yours seems good enough, though I'd switch templates out for generator.

I'd like to be able to have "named" templates that people could install via npm if they'd like:

// create a coffee app
// looks in the global node modules dir
$ npm install geddy-coffee -g
$ geddy app --generator=geddy-coffee myApp

// create a special scaffold
// looks in the local node modules dir
$ npm install geddy-facebook
$ geddy scaffold --generator=geddy-facebook user

We should have it default to looking in the app's local node modules directory, then check global. If they put a full path in though, that should always override it.

@MiguelMadero
@Asp3ctus
Asp3ctus commented Oct 8, 2012

+1 for the custom generators ... i will try to play around with the templates folder ...

@mde
mde commented Oct 8, 2012

This is probably super-easy to do by setting an environment variable. Just need to pass it along to the Jake task.

@Techwraith Techwraith closed this Oct 13, 2012
@Techwraith

Closing in favor of #226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.