Adding Existing Cordova Project into Visual Studio

Luiz Rolim picture Luiz Rolim · Apr 6, 2015 · Viewed 7.9k times · Source

I´ve just started to use CTP3.1 for visual studio 2013.

I´m creating a angularjs-ionic application, and I´d like to be able to download and run some ionic examples which are available on the web, such as https://github.com/bgoetzmann/ionic-persistence (just to quote one).

I´ve noticed that, usually, the examples applications found under github have a different structure other that Visual Studio´s (probably, they have the "dist" structure of VS). Usually, they relly on grunt or gulp + bower to perform some build tasks too.

What would be the recommended way of picking up such projects and importing them into VS?

Is there any efficient way of doing so, other than trying to copy and paste them into a new Cordova Project?

Thanks

Answer

Evgeny Ivanov picture Evgeny Ivanov · Jun 2, 2016

VS 2015 (maybe VS 2013 update 2 too) provides cool feature - creating a project from existing code.

You can do this with next steps:

  1. File -> Create -> Project from existing code Menu item's names may be different, i have a localized version of VS.
  2. Choose project type - Apache Cordova
  3. Enter an existing git cloned project's path and new project name. VS will create solution with entered name.

That' all!

You can open next files for correcting project name at the whole:

  • config.xml (widget id, name, description & author)
  • www/index.html (title)
  • bower.json (name, homepage, author & description)
  • package.json (name & description)
  • ionic.project (name)