kristianmandrup / generator-aurelia-ts

Turbo Start generator for Aurelia apps
32 stars 4 forks source link

PR for this #1

Closed telekosmos closed 9 years ago

telekosmos commented 9 years ago

Hi This generator as it is is not working AFAIT (as far as I tried ;-P). So I've come up with another one to support Typescript and Foundation (in addition to the originals ES6/Bootstrap), strongly based in this one (structure is the same).

Let me know if you wanna merge from https://github.com/telekosmos/generator-aurelia-ts/tree/feat-typescript-foundation

kristianmandrup commented 9 years ago

Sure! Would love to :)

kristianmandrup commented 9 years ago

I will make a release shortly and announce it on Aurelia Discuss, giving you most of the credit! Awesome work :)))

telekosmos commented 9 years ago

Thanks! But don't forget register/publish in yeoman registry: I've checked there is just a (very) default aurelia generator which just downloads the skeleton-navigation repo and nothing else. Cool to be up to date, but it doesn't provide any option... Regarding to the credit, just split up! I'll try to go on doing things

kristianmandrup commented 9 years ago

However, after running npm install then mocha I get an infinite recursion error...

  aurelia-ts:app
*** before helpers
just before genertor.run is called
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
ComposingWith aurelia-ts:typescript for: Bootstrap
(node) warning: possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at Queue.addListener (events.js:236:17)
    at Queue.once (events.js:262:8)
    at run (/Users/kristianmandrup/repos/generator-aurelia-ts/node_modules/yeoman-generator/lib/base.js:389:20)
    at composeWith (/Users/kristianmandrup/repos/generator-aurelia-ts/node_modules/yeoman-generator/lib/base.js:618:15)
    at module.exports.yeoman.generators.Base.extend.end (/Users/kristianmandrup/repos/generator-aurelia-ts/generators/app/index.js:169:10)
    at /Users/kristianmandrup/repos/generator-aurelia-ts/node_modules/yeoman-generator/lib/base.js:421:16
    at processImmediate [as _immediateCallback] (timers.js:368:17)
(node) warning: possible EventEmitter memory leak detected. 11 change listeners added. Use emitter.setMaxListeners() to increase limit.

due to this recursive call?:

  end: function() {
    console.info('ComposingWith aurelia-ts:typescript for: ' + this.cssFramework);

    this.composeWith('aurelia-ts:typescript', {

but this is another generator... hmm? seems to just call the main generator again? strange!

telekosmos commented 9 years ago

Ok, stop the greetings and publishing procedure :-P and I will take a look (actually, I didn't test it :-S) and I'll let you know

kristianmandrup commented 9 years ago

Added this in app/index.js

  constructor: function() {
    console.log('aurelia generator');
ComposingWith aurelia-ts:typescript for: Bootstrap
aurelia generator
ComposingWith aurelia-ts:typescript for: Bootstrap
aurelia generator
ComposingWith aurelia-ts:typescript for: Bootstrap
aurelia generator

I'm @k.mandrup on skype ;)

telekosmos commented 9 years ago

BTW, what params did you set regarding to language (ES6 or TS)? ... Ok, I know, the messages crossed halfway: TS+Bootstrap

kristianmandrup commented 9 years ago

I think it is my mistake, I didn't install generator locally... need better install/run/usage/dev instructions :P

telekosmos commented 9 years ago

"Your mistake" could be anyone else's mistake :-D. And yes, README should be refurbished hehe. I don't think it is even 90% finished, I sent you to take a look and tell me what was wrong, as you did hihi.

I've just tested by doing:

then

$ mocha

  0 passing (4ms)

Let me know what is wrong with my generator params and also tell me your node version, as I'm using io.js v1.6.3 and there could be some issues with versions...

telekosmos commented 9 years ago

Mmmm, I've done some research. The point was in testing the subgenerator (you have to mock it). The recursive call was definitely a bug from me; I've fixed but get another annoyances related to the subgenerator.

Similar to Typescript unit tests, but there will have to generate the ES files as I've found out karma-typescript-preprocessor but it was not working for me. In the end, the test tasks for TS depends on build-system task.

It is supposed generators tests are working (check mocha) and also the tests for the generators combinations (for ES6/TS, TS+amd/commonjs, css frameworks).

Have PR. Let me know

kristianmandrup commented 9 years ago

Sure, lets do the PR and integrate. Sorry, been really busy lately, but now I've left my job to pursue my own Digital Nomad lifestyle and work only on my own projects :) I'd like to update this generator with latest TypeScript updates at https://github.com/cmichaelgraham/aurelia-typescript-atom/tree/master/skel-nav-ts/typings/aurelia

I also wanna add support/integration for semantic-ui, currently the best UI framework by miles!!! Cheers!

kristianmandrup commented 9 years ago

I also want to switch to using ESlint in line with recent updates/improvements to https://github.com/babel/babel-library-boilerplate