You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for angular-cli generated projects out of the box #4
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...
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.
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 )
+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
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?
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.
@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):
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:
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.
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.
Activity
angelozerr commentedon Mar 6, 2016
Yes sure.
....
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 ?
micaelgallego commentedon Mar 6, 2016
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.
angelozerr commentedon Mar 7, 2016
@micaelgallego do you think it could be interested to have Wizard (New Angular2 Project, New Component, etc) which calls angular2-cli ?
paulvi commentedon Mar 7, 2016
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
angelozerr commentedon Mar 7, 2016
IMHO I think IDE should work without installing nothing. It's the idea that I have followed with typescript.java :
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 )
micaelgallego commentedon Mar 7, 2016
+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
angelozerr commentedon Mar 7, 2016
@micaelgallego do you think it's better to have an Angular2 Console or an Angular2 Wizard?
micaelgallego commentedon Mar 7, 2016
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?
angelozerr commentedon Mar 7, 2016
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.
micaelgallego commentedon Mar 7, 2016
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 serveprovides 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?
Initialize angular-cli project. See
angelozerr commentedon Jun 17, 2016
@micaelgallego @paulvi I have studied how we could integrate angular-cli with Eclipse :
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):
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:
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
micaelgallego commentedon Jun 18, 2016
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!
Provide Local Terminal (Interpreter) with 'cd', 'npm' interpreter. See
Initialize ng interpreter. See
2 remaining items
Fix ng command interprter. See
Clean API for command interpreter. See
Clean API for command interpreter. See
Clean API for command interpreter. See
paulvi commentedon Jun 22, 2016
Looking again at Bug 447206 - [TERMINALS] API for line completion suggestions
Is there actually bash script for angular completion? Like the exist for git
angelozerr commentedon Jun 22, 2016
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).
Initialize New Angular2 Project wizard. See
Start implementing wizard to create service with angular-cli. See
Start implementing wizard to create service with angular-cli. See
Add Project field in the service wizard. See
Provide wizard for angular-cli. See
Provide wizard for angular-cli. See
angelozerr commentedon Jun 29, 2016
@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!