Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic CLI v3 moved commands from ionic to ionic cordova #279

Closed
janpio opened this issue May 22, 2017 · 8 comments · Fixed by #280
Closed

Ionic CLI v3 moved commands from ionic to ionic cordova #279

janpio opened this issue May 22, 2017 · 8 comments · Fixed by #280
Milestone

Comments

@janpio
Copy link

janpio commented May 22, 2017

From a user post on the Ionic Forum I learned that vscode-cordova supports Ionic CLI - awesome.

Ionic CLI was recently released in a new major version 3 that moved some commands from ionic to ionic-cordova:

Cordova commands have been namespaced (e.g. ionic cordova build, not ionic build)

https://github.com/driftyco/ionic-cli#changes-from-cli-2

So ionic build became ionic cordova build etc. Full list of ionic cordova subcommands:

   cordova build ....... Build (prepare + compile) an Ionic project for a given platform
   cordova compile ..... Compile native platform code
   cordova emulate ..... Emulate an Ionic project on a simulator or emulator
   cordova platform .... Add or remove a platform target for building an Ionic app
   cordova plugin ...... Manage Cordova plugins
   cordova prepare ..... Transform metadata to platform manifests and copies assets to Cordova platforms
   cordova resources ... Automatically create icon and splash screen resources
   cordova run ......... Run an Ionic project on a connected device

Where do I have to look to maybe make a PR for this?

@imhoffd
Copy link

imhoffd commented May 22, 2017

Hi, I work on the Ionic CLI. I see ionic being used as if it's a superclass of cordova. That's totally understandable due to our command structure for years. With our new CLI, however, we're moving towards less of a "marriage" of Ionic/Cordova in the CLI and more of an "integration". We're seeing interest in additional target platforms such as web apps, desktops, and PWAs. For these platforms, the assumed Cordova functionality is not desired.

Anyway, my recommendation is to use the Ionic v2 CLI (available at npm i -g ionic@legacy) under the hood. (Does vscode-cordova install its own Ionic CLI?) I think our Cordova integration will continue to morph into something that makes sense for both platforms, so opting into the new CLI right away for an IDE plugin that requires a very static API might be unwise (not that I plan on making breaking changes any time soon).

I also see some deprecated usages of Ionic--not sure the state of Ionic in this plugin, as the readme also says "Ionic 2 Beta is not currently supported".

@neilor
Copy link
Contributor

neilor commented May 24, 2017

Hi, sorry if I'm making any mistake when talking about this but I'm only trying to help. If we start by the principle that we could check if isIonic3Project, we can change this behaviour on debugger extension. Is this right?

If you think that's make sense, I'm available for this challenge. I'm an beginner on open source contributions but I have motivation to do this correctly. =)

@janpio
Copy link
Author

janpio commented May 24, 2017

Looks like this is at least part of it, yeah.

But: Don't call it isIonic3Project but isIonicCLIv3or something. When people talk about "Ionic3" they usually mean 3.x of `ionic-angular, the framework version and not the CLI. (Also the code here that talks about Ionic 1 and Ionic 2 means Ionic Framework v1 vs Ionic Framework v2+, including Ionic 3 etc.) So you would probably need another helper that finds out the Ionic CLI version that is running on the system. (This applies to Ionic v1 projects, too, by the way)

@neilor
Copy link
Contributor

neilor commented May 24, 2017

Sure, its make more sense.

I'm starting to code this update. Please, help me with comments about any trouble in my code.

@janpio
Copy link
Author

janpio commented May 24, 2017

Sure, if you have something working just open a PR with a comment that it shouldn't be merged yet and ping us here with a link to the PR - I will look over the code then.

@neilor
Copy link
Contributor

neilor commented May 24, 2017

I working right now with this fix in my VSC and works fine!

Ps: Please, let me know if I did any mistake until here. As I commented below, I'm beginner on all of this process of contributing. I've tried to follow contribution guides correctly.

@janpio
Copy link
Author

janpio commented May 24, 2017

Checking for @ionic/cli-plugin-cordova is a great idea. Do you agree @dwieeb?

@imhoffd
Copy link

imhoffd commented May 25, 2017

Makes sense to me for the foreseeable future.

@vladimir-kotikov vladimir-kotikov added this to the 1.2.8 milestone Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants