Git Product home page Git Product logo

Comments (14)

dustinspecker avatar dustinspecker commented on September 13, 2024

Typescript is something I'd like to include in this generator (possibly Dart). Unfortunately, I don't have any experience with Typescript, so this may be a while.

from generator-ng-poly.

dustinspecker avatar dustinspecker commented on September 13, 2024

Hi,

I've been looking into TypeScript the last few days and have a few questions regarding your opinion, if you have time.

https://github.com/Keats/ng-boilerplate seems like a nice starting point. I haven't found a use for TypeScript's modules, though. Do you typically create modules when working with TypeScript? Importing the modules in a main app module doesn't sound too flexible, which are the only examples of modules used in Angular I've found.

I'm completely on board for adding TypeScript's typing, interfaces, and classes; I just want to make sure I'm not overlooking TypeScript's modules. I will probably have time to get these added soon.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

Great! I am also not sure about Typescript module because it seems to share the same functionalities as angular module.

Also, I will be able to help with adding Typescript because I need it soon in a project.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

I will work on this in a couple of days. Please let me know if you already started on this.

from generator-ng-poly.

dustinspecker avatar dustinspecker commented on September 13, 2024

Sounds good. I haven't started on it.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

Feel free to add more tasks or take on any of them. By the look of it, I feel like utils/route is the more challenging one.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

As for Typescript and AngularJs module, I feel like the current best solution is to have generate a new Typescript module along side with AngularJs module.

from generator-ng-poly.

dustinspecker avatar dustinspecker commented on September 13, 2024

I looked into this some more. TypeScript modules will need to be used, especially when passing functions is enabled. TypeScript modules allow us to have multiple functions with the same name (config, etc.) in the application, otherwise throws a compile error. Also, classes will have to be defined before we pass it to angular.module().controller(), etc. since TypeScript compiles it to JavaScript variable instead of function, so this causes hoisting issues. I'll try to get these changes added later this week/weekend, which should just about get this done. Then just the Karma issue.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

Working on Karma one now

from generator-ng-poly.

dustinspecker avatar dustinspecker commented on September 13, 2024

I think I have the available typings pulled in. It also runs tsd reinstall && tsd rebundle at setup to create the typings/tsd.d.ts file. Currently, I'm using tsd@next. I've updated the app source templates and those should be working. I think there are a few typings missing. I haven't looked at the test templates, yet, but I'll have time the next couple of days to cover this and the temp directory.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

Great! Thanks

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

FYI, I've been using TypeScript in ng-poly in production for a while without major problem. Obviously, the module system can be improved but it is not a major problem for us.

from generator-ng-poly.

dustinspecker avatar dustinspecker commented on September 13, 2024

That's great to hear. Do you guys have any suggestions for improving the modules?

The Gulpfiles have been updated to build the app and tests in a tmp directory for unit tests. The templates are updated. Unfortunately, there is an issue with angular-protractor and jQuery conflicting (DefinitelyTyped/DefinitelyTyped#2734) for e2e tests.

from generator-ng-poly.

ngbinh avatar ngbinh commented on September 13, 2024

Awesome! Thanks a lot! I will update our build to the latest version.

from generator-ng-poly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.