angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

The generators still produce JS instead of TS? #1691

Closed sedina closed 8 years ago

sedina commented 8 years ago

In latest release TypeScript and Babel are the supported scripts. So we generated our project and choosed TypeScript for the scripting, BUT then we discovered that every client-side-generator is still only producing JS?? Why is it like this? In my opinion the generators are loosing their point if they are going to behave like this.

Awk34 commented 8 years ago

They're being generated with .js instead of .ts?

AmirGilboa commented 8 years ago

Yes, here as well. you select typescript, and it still creates js.

sedina commented 8 years ago

In my opinion you are rushing too much ahead with TypeScript as replacement of the native JS, basically the tsd plugins for Grunt are as well very buggy and in a sort of pre-pre-mature stage. Several teams that I'm in contact with are thinking about abandoning fullstack generator because of the huge amount of bugs in the release for TS

Awk34 commented 8 years ago

In my opinion you are rushing too much ahead with TypeScript as replacement of the native JS, basically the tsd plugins for Grunt are as well very buggy and in a sort of pre-pre-mature stage. Several teams that I'm in contact with are thinking about abandoning fullstack generator because of the huge amount of bugs in the release for TS - @sedina

That is a mean-spirited thing to say. You pay absolutely nothing for using this project, and all the hard work I put towards this project I get zero compensation for. All the work I do for this project is out of my desire to help the community. There are many features in the project that I try to contribute, as requested by the community, but I don't possibly have enough time/resources to test everything fully and fix 100% of the bugs in the project; that's one part where I count on community members who use features to find bugs and fix them. This is an open source project, and we do accept pull requests. Feel free to complain to some other project, though.

sedina commented 8 years ago

My apology for somewhat mean-spirited comment. It was not my intention, comment above is not about crticising you, and yes I know that this is non-commercial product it's opensource and everyone do the best they can. I just wanted to understate the fact that several issues are introduced around TS becuase the ecosystem of TypeScript seem to be too young. At the same time I'm aware of the fact why you are pushing TS, because of Angular2. So my question is how the core-dev-team of fullstack-generator is reasoning about TS acceptance in general, do you feel that it's taking off or not?

Awk34 commented 8 years ago

@sedina It's alright, I probably took it too seriously.

You can read about the scripting language decisions here: #1281

Awk34 commented 8 years ago

I haven't been able to reproduce this. The generator should be outputting .ts files when you select TypeScript.

If you're referring to how the .ts files don't have any types, that has to do with how the .ts files are generated. As of right now, the generator only copies the .js files and changes the file extension. In the future, I will be adding types, and have the option of generating a project without types.

jaspersorrio commented 8 years ago

Hi @Awk34 thanks for building such a wonderful generator.

Unfortunately, I too have this issue.

I would love to contribute in anyway i can. Let me start by providing some details.

Jasper’sMBP:dsky jasperyap$ yo angular-fullstack:directive dskyToolbar
(!) require('yeoman-generator').generators.Base is deprecated. Use require('yeoman-generator').Base directly
? What module name would you like to use? dskyApp.dskyToolbar
? Where would you like to create this directive? client/app/dskytoolbar
? Does this directive need an external html file? No
   create client/app/dskytoolbar/dskyToolbar/dskyToolbar.directive.js
   create client/app/dskytoolbar/dskyToolbar/dskyToolbar.directive.spec.js

And my .yo-rc.json contains this

{
  "generator-angular-fullstack": {
    "generatorVersion": "3.5.0",
    "endpointDirectory": "server/api/",
    "insertRoutes": true,
    "registerRoutesFile": "server/routes.js",
    "routesNeedle": "// Insert routes below",
    "routesBase": "/api/",
    "pluralizeRoutes": true,
    "insertSockets": true,
    "registerSocketsFile": "server/config/socketio.js",
    "socketsNeedle": "// Insert sockets below",
    "insertModels": true,
    "registerModelsFile": "server/sqldb/index.js",
    "modelsNeedle": "// Insert models below",
    "filters": {
      "js": true,
      "ts": true,
      "html": true,
      "css": true,
      "ngroute": true,
      "bootstrap": false,
      "uibootstrap": false,
      "socketio": true,
      "auth": true,
      "models": true,
      "mongooseModels": true,
      "mongoose": true,
      "grunt": true,
      "jasmine": true,
      "mocha": false,
      "should": false,
      "expect": false
    }
  },
  "generator-ng-component": {
    "routeDirectory": "client/app/",
    "directiveDirectory": "client/app/",
    "componentDirectory": "app/components/",
    "filterDirectory": "client/app/",
    "serviceDirectory": "client/app/",
    "basePath": "client",
    "moduleName": "",
    "modulePrompt": true,
    "filters": [
      "ngroute",
      "jasmine",
      "ngroute",
      "es6"
    ],
    "extensions": [
      "ts",
      "js",
      "html",
      "css"
    ],
    "directiveSimpleTemplates": "",
    "directiveComplexTemplates": "",
    "filterTemplates": "",
    "serviceTemplates": "",
    "factoryTemplates": "",
    "controllerTemplates": "",
    "componentTemplates": "",
    "decoratorTemplates": "",
    "providerTemplates": "",
    "routeTemplates": ""
  }
}
Awk34 commented 8 years ago

@jaspersorrio thanks for your issue & details (next time create a new issue & link to the old, closed one). Your specific issue will be fixed in the next release of generator-ng-component