Home:ALL Converter>Building ionic app with cordova cli

Building ionic app with cordova cli

Ask Time:2015-08-12T13:35:10         Author:JimR

Json Formatter

I've just started to use the v1.0.1 of the ionic framework (by manually including the ionic css and js files and changing my directives to ionic directives) with a existing Cordova/Angular app for iOS/Android. My build infrastructure is currently setup to use the Cordova cli tools (v5.0) and I'd prefer to not change it if possible.

Is there any reason I shouldn't continue building my app using the Cordova cli rather than swapping to the ionic cli? Are there any potential compatibility issues? I understand that ionic is just a layer on top of Angular so it shouldn't have any effect on the app build process so building with Cordova should be ok?

Author:JimR,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31956768/building-ionic-app-with-cordova-cli
Nikola :

Yes, building with Cordova CLI will be perfectly fine - Ionic actually uses Cordova in the backend.\n\nSo, for example ionic plugin add http://github.com/somePlugin does basically the same thing as cordova plugin add http://github.com/somePlugin.\n\nBelow you can see my terminal output, to affirm what I said above:\n\nC:\\Users\\Nikola\\Desktop\\test\\plugintest>cordova plugin add cordova-plugin-camera\nFetching plugin \"cordova-plugin-camera\" via npm\nnpm http GET https://registry.npmjs.org/cordova-plugin-camera\nnpm http 200 https://registry.npmjs.org/cordova-plugin-camera\nnpm http GET https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-1.2.0.tgz\nnpm http 200 https://registry.npmjs.org/cordova-plugin-camera/-/cordova-plugin-camera-1.2.0.tgz\n\nC:\\Users\\Nikola\\Desktop\\test\\plugintest>cordova plugin list\ncom.ionic.keyboard 1.0.4 \"Keyboard\"\ncordova-plugin-camera 1.2.0 \"Camera\"\ncordova-plugin-console 1.0.1 \"Console\"\ncordova-plugin-device 1.0.1 \"Device\"\ncordova-plugin-splashscreen 2.1.0 \"Splashscreen\"\ncordova-plugin-whitelist 1.0.0 \"Whitelist\"\n\nC:\\Users\\Nikola\\Desktop\\test\\plugintest>ionic plugin list\ncom.ionic.keyboard 1.0.4 \"Keyboard\"\ncordova-plugin-camera 1.2.0 \"Camera\"\ncordova-plugin-console 1.0.1 \"Console\"\ncordova-plugin-device 1.0.1 \"Device\"\ncordova-plugin-splashscreen 2.1.0 \"Splashscreen\"\ncordova-plugin-whitelist 1.0.0 \"Whitelist\"\n\nC:\\Users\\Nikola\\Desktop\\test\\plugintest>cordova plugin remove cordova-plugin-camera\nRemoving \"cordova-plugin-camera\"\n\nC:\\Users\\Nikola\\Desktop\\test\\plugintest>ionic plugin add cordova-plugin-camera\nUpdated the hooks directory to have execute permissions\nFetching plugin \"cordova-plugin-camera\" via npm\nnpm http GET https://registry.npmjs.org/cordova-plugin-camera\nnpm http 304 https://registry.npmjs.org/cordova-plugin-camera\nSaving plugin to package.json file\n\n\nHowever, ionic cli has some additional features (like for example ionic resources to name at least one) which you may want to use to generate splash screen and icons.",
2015-08-12T06:34:26
yy