diegonetto / generator-ionic

Build hybrid mobile apps using the Ionic Framework
MIT License
1.74k stars 336 forks source link

Add support for CoffeeScript a la generator-angular style #25

Open mhartington opened 10 years ago

mhartington commented 10 years ago

As this grows and becomes more popular, it should support more than just pure javascript. There should be options at the start of the generator to select CoffeeScript.

I know the angular generator form Yeoman comes with the option to include coffee script So that can also be a good case to have that generator be pulled in as a sub-generator and have some of its powerful features.

diegonetto commented 10 years ago

Really not a fan of CoffeeScript but I'm definitely willing to pull in support for it if the community wants it!

I really like what Google has done with Traceur - https://github.com/google/traceur-compiler. Being able to use ES6 features https://github.com/google/traceur-compiler/wiki/LanguageFeatures but have it compile to the JavaScript of today is quite exciting.

I'll mark this as an enhancement request and we can get to it as more requests come in.

rzane commented 10 years ago

+1

mhartington commented 10 years ago

@diegonetto I like Traceur, very forward thinking (considering angular announced angular 2.0 will be targeting ES6).

I'll admit, I'm not a fan of coffee script either, but if people want it, why not?

diegonetto commented 10 years ago

To repeat what I said earlier, I'm willing to pull in support for CoffeeScript if the community wants it, but was waiting for more requests to come in before making it a priority.

The addition of downloadable starter templates starting in version 0.2.0 made this task even more difficult since we would need to write the CoffeeScript files for each of the four starter templates.

I just don't have the time for that undertaking right now so it will probably have to wait until mid May.

cschneid commented 10 years ago

I'm new to the grunt/yeoman world (although with a fair bit of other JS knowledge) so I'm not sure how to go about this - is there a way to add coffee compilation to the various compilation steps, leaving the translation parts to me?

cschneid commented 10 years ago

Followup - here's how far I got - but I'm not sure how to make the coffee:dist task to work - also I'm sure there's a package I've gotta add to the project somewhere...

https://gist.github.com/cschneid/10700087

cschneid commented 10 years ago

After working on this further and following the install here - see my final gruntfile at https://gist.github.com/cschneid/10702021

The biggest thing was the command:

npm install grunt-contrib-coffee

Live reload works Coffee gets compiled right (converted the app.js and controllers.js with js2coffee tool)

Haven't tried much beyond that (tests / etc), but it works so far.

timmyg commented 10 years ago

+1

screendriver commented 10 years ago

+1 Any news about it?

emilsoman commented 10 years ago

+1 for Coffeescript support !

kaiqigong commented 10 years ago

+1

benmliang commented 10 years ago

+1

bvsatyaram commented 10 years ago

+1

cschneid commented 10 years ago

I'm gonna go out on a limb and say the +1s aren't helping any more.... somebody who knows grunt more than me should grab the work I put up and polish it.

diegonetto commented 10 years ago

@cschneid I'll take a look at the js2coffee tool and see if I can knock this feature request out within the next week or so, since its become a more popular request! Just be sure to share this generator with your fellow CoffeeScript loving developers once its supported :)

rafaelmotta commented 9 years ago

Hi guys, I made some changes in the gruntfile.js to add support to coffee files. There are a few things to do yet, but I think that's the main thing.

First of all, add the package grunt-contrib-coffee in the package.json or install it manually

npm install grunt-contrib-coffee

Then, copy this gist to add support to coffee files:

https://gist.github.com/rafaelmotta/1214cb0c755da1cb0e4e

If anyone wants to continue it would be great. Is a very important issue.

vevisystems commented 9 years ago

+1

fnebenfuehr commented 9 years ago

+1

nez commented 9 years ago

+1 :)

vhsalazar commented 9 years ago

+1

zquintana commented 9 years ago

+1

NeXTs commented 9 years ago

+1

paolomaffei commented 9 years ago

+1, I can't get @rafaelmotta instructions working with current version of ionic-generator

paolomaffei commented 9 years ago

Shall anybody be interested, here's the ionic sidemenu starter app in coffeescript: https://github.com/paolomaffei/ionic-sidemenu-coffeescript (using ionic 1.10)

romankierzkowski commented 8 years ago

+1

snimavat commented 8 years ago

+1