Skip to content

Support for angular-cli generated projects out of the box #4

Closed

Description

@micaelgallego

As angular-cli is the official tool to generate boilerplate for angular 2 projects, I think it is good to have support for this tool out of the box.

As per documentation, it is recommended to install angular-cli globally with npm install -g angular-cli to use commands directly in the command line. The following commands are some of the most important:

  • ng new PROJECT_NAME: Creates a new project.
  • ng serve: Start a web server with integrated TS compiler and browser auto-reload on save.
  • ng build: Generates distribution artifacts.

I think it will be good if angular2-eclipse have direct short-cuts to these commands and show its output.

In the future it can be considered to allow execute jasmine tests directly in a browser integrated in eclipse, show results, etc...

What do you think?

Activity

  1. angelozerr commented on Mar 6, 2016

    @angelozerr
    Owner

    I think it is good to have support for this tool out of the box.

    Yes sure.

    I think it will be good if angular2-eclipse have direct short-cuts to these commands and show its output.

    ....

    In the future it can be considered to allow execute jasmine tests directly in a browser integrated in eclipse, show results, etc...

    You mean to have an "ng" launch configuration type like I have done for protractor https://github.com/angelozerr/angularjs-eclipse/wiki/Protractor ?

  2. micaelgallego commented on Mar 6, 2016

    @micaelgallego
    Author

    You mean to have an "ng" launch configuration type like I have done for protractor https://github.com/angelozerr/angularjs-eclipse/wiki/Protractor ?

    Yes, something like that will be very cool. I don't know how difficult can be port this functionality to Angular 2, but if you focus initially in angular-cli tool, maybe it is easier because the project structure (and dependencies) are well known.

    I focused in angular-cli because I think that support every angular2 seed project out there can be very complicated and angular-cli is the official one.

  3. angelozerr commented on Mar 7, 2016

    @angelozerr
    Owner

    @micaelgallego do you think it could be interested to have Wizard (New Angular2 Project, New Component, etc) which calls angular2-cli ?

  4. paulvi commented on Mar 7, 2016

    @paulvi

    BTW, New user may not know about having to install angular-cli. Some warning should be.

    Nodeclipse has similar idea by using express generator
    https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.ui/src/org/nodeclipse/ui/wizards/ExpressProjectWizard.java#L104

  5. angelozerr commented on Mar 7, 2016

    @angelozerr
    Owner

    BTW, New user may not know about having to install angular-cli. Some warning should be.

    IMHO I think IDE should work without installing nothing. It's the idea that I have followed with typescript.java :

    • no need to install node.js (by providing embedded node.js)
    • no need to install TypeScript (by providing a TypeScript bundle)

    BUT user can override the embedded node.js and default TypeScript if they wish.

    I would like to follow the same idea. When user will install Angular2 Eclipse it will provide a default angular2-cli (that user will able to override if he wishes). The install of default angular2-cli could be a feature update site (is user doesn't want to install it and in this case a warning should be like you have mentionned @paulvi )

  6. micaelgallego commented on Mar 7, 2016

    @micaelgallego
    Author

    +1
    If plugin includes all necessary software it is easier for newbies. For more advanced users, as you suggested, I think will be good to have the possibility to not install embebed node.js and angular-cli

  7. angelozerr commented on Mar 7, 2016

    @angelozerr
    Owner

    @micaelgallego do you think it's better to have an Angular2 Console or an Angular2 Wizard?

  8. micaelgallego commented on Mar 7, 2016

    @micaelgallego
    Author

    It depends on the concrete task. But as today angular-cli is in alpha and change every day. A console is more robust and adaptative to changes. In the future, when tools are more mature, maybe several wizards can be implemented. What do you think?

  9. angelozerr commented on Mar 7, 2016

    @angelozerr
    Owner

    Are you sure that "ng init", "ng g component my-new-component" will change?

    I don't know if it's easy to implement Eclipse Console, like Bower, NPM console.

  10. micaelgallego commented on Mar 7, 2016

    @micaelgallego
    Author

    You are right, these basic commands are very stable. If angular2-eclipse offers wizards it will be amazing, but maybe command parameters can change and it will be more work to maintain plugin updated. There is other important aspect to take account. The command ng serve provides useful information in the console and it is always executing (to offer incremental compilation). The wizard is not very suitable in this case.

    A console is not very eclipse-friendly, but it can be easier to implement reusing other eclipse plugins. In a first version console can be very useful. In following versions, new wizards can be implemented.

    What do you think?

  11. added a commit that references this issue on Jun 11, 2016
  12. angelozerr commented on Jun 17, 2016

    @angelozerr
    Owner

    @micaelgallego @paulvi I have studied how we could integrate angular-cli with Eclipse :

    • with wizard
    • with terminal shell.

    I have commited some work for having a "New Angular2 Project" wizard but it doesn't work now.

    I have studied terminal shell which is integrated with Eclipse. The cool thing is that we can extend and I have implemented a "Local Terminal (Interpreter)" where the idea is to interpret commands and refresh the workspace.

    Here a demo (I have not pushed my work) with "new new" command (once ng new is finished the interpreter creates an Eclipse Project and open the generated package.json):

    animation

    Do you like it? Any feedback are welcome.

    My idea with command interpreter is to provide an extension point to add other interepter. Here a sample with cd, and npm install:

    unnamed

    For your information, I have created a bug for Terminal Eclipse with my idea at https://bugs.eclipse.org/bugs/show_bug.cgi?id=496109

  13. micaelgallego commented on Jun 18, 2016

    @micaelgallego
    Author

    Hi @angelozerr, I think the approach of listening terminal is a good idea. It is good because all documentation of angular-cli can be applied "as is" but you can show results of commands (that is, files generated or modified) in the context of eclipse project explorer.

    Good job!

  14. 2 remaining items

  15. paulvi commented on Jun 22, 2016

    @paulvi

    Looking again at Bug 447206 - [TERMINALS] API for line completion suggestions

    Is there actually bash script for angular completion? Like the exist for git

  16. angelozerr commented on Jun 22, 2016

    @angelozerr
    Owner

    Is there actually bash script for angular completion? Like the exist for git

    It seems angular cli support that https://github.com/angular/angular-cli#commands-autocompletion

    but I with Windows OS, I don't know how to do that (never used gitbash).

  17. angelozerr commented on Jun 29, 2016

    @angelozerr
    Owner

    @micaelgallego I have finished my work about this (big) issue. Now you can consume angular-cli:

    I think we could improve wizards for instance to add advanced parameters (for the moment just the name is available), add preferences for ng server, etc. But I don't know if it is very important.

    Please create new issues if you need some improvement of if you find bugs.

    Thanks!

  18. added this to the 1.0.0 milestone on Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions