yeoman / generator-karma

Yeoman generator for Karma
http://yeoman.io
BSD 2-Clause "Simplified" License
172 stars 48 forks source link

Add support for '--typescript' command line option #77

Closed awk closed 8 years ago

awk commented 9 years ago

Add --typescript to generate a karma.conf with typescript preprocessor.

kevva commented 9 years ago

-1 for me. I'm not even sure if we should continue support coffeescript.

arthurvr commented 9 years ago

I'm -1 too though I guess the fact that generator-angular is going to add support for typescript we will be forced to. The angular community seems to be strongly behind Typescript (it also seems the future for angular 2).

I'm not even sure if we should continue support coffeescript.

+1, we will drop support for coffeescript in many generators anyways and replace it with Babel.

awk commented 9 years ago

I made the patch because of the addition to typescript to generator-angular - there's clear interest in making greater use of typescript in the angular community and given the link between generator-angular and generator-karma this seemed the right thing to do.

Having said that forking both projects into generator-XXX-typescript isn't impossible, though it comes with its own set of maintenance headaches etc.

Can you explain how switching to Babel would affect either coffee script or typescript support? From my perspective the change that's required is to run the language appropriate pre-processor and that needs a karma.conf change or is there a different approach that could be used?

eddiemonge commented 9 years ago

-1 from me on this and CoffeeScript as well. As we move towards greater composability, we should have things like CoffeeScript and TypeScript and AtScript and whatever else be in their own generator that can then compose on top of this. More so since this doesn't write the Grunt specific stuff into a Gruntfile.coffee file anyway.

awk commented 9 years ago

I'd be more than happy to follow a composition workflow to enable a generator to be composed from core pieces and 'built up'. Can you point me to some documentation that covers that approach? Can it be done today? Or is the only choice right now to either 'clone' the generator by creating a fork with the extra pieces or to update the generator (ie. this pull request)?

eddiemonge commented 8 years ago

I think we are at a point that it can be done today. Follow the composing with docs on Yeoman.io. There might have to be some JS to TS compilation though