angular-eclipse icon indicating copy to clipboard operation
angular-eclipse copied to clipboard

Angular2 Nature

Open angelozerr opened this issue 9 years ago • 2 comments

How to determine that a project has Angular2 nature?

  • search in the package.json if angular2 exists as dependencies?
  • search from typing folder if angular2 exists?
  • search from node_modules if angular2 exists?

But those folder, package.json could be hosted not only in project root (like src folder). So we could foolw the same idea than https://github.com/angelozerr/typescript.java/issues/12#issuecomment-192862224

And at the end if the user project doesn't follow thoses rules, user will be able to to "Convert as Angular2" to add Eclipse Angular2 nature to the project.

What do you think about that @micaelgallego @piotrtomiak

angelozerr avatar Mar 12 '16 11:03 angelozerr

+1 To search in package.json. As far as I know, it is the common way to obtain angular2 dependencies.

If you search only in node_modules, what happen if npm install haven't executed yet? What do you plan to do if node_modules folder is missing?

micaelgallego avatar Mar 12 '16 12:03 micaelgallego

Agreed with @micaelgallego: package.json seems like a very good place to look for the stuff and have a failsafe with nature if not found (Convert as Angular2 and add nature).

piotrtomiak avatar Mar 14 '16 15:03 piotrtomiak