With ionic2 - I could run ionic build
, and it would generate a www folder that I can then deploy as a web app.
Ionic 3 build has changed to ```ionic cordova build ``" which is only ios/android.
Is it a good assumption that ionic serve
dynamically builds for mobile web, and there’s no additional steps needed to take? Or did ionic2 operate the same, but I misunderstood ionic build command.
This is only my 2nd week using ng2/ionic.
What exactly are you talking abouth with “Ionic2” and “Ionic 3”?
I would assume the Ionic CLI that went from v2.2.3 to v3.0.0 release a few days ago. Correct?
So it seems 2.2.3 defaulted to iOS and just built for that.
This I don’t really understand. From my console with 2.2.3:
PS C:\Users\Jan\Documents\superAfter> ionic info
Your system information:
ordova CLI: 6.5.0
Ionic Framework Version: 3.2.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.1
Xcode version: Not installed
PS C:\Users\Jan\Documents\superAfter> ionic build
✗ You cannot run iOS unless you are on Mac OSX.
Bare with me, I’m new to this stack -
ionic-1 refers to support for angular-1, ie. angularjs?
ionic in this forum generally referers to the cli 2+, and any support for angular 2+.
but now angular is now referred to version 2+, not version 1, or ng2.
with this in mind, ionic cli 2.x.x can only support angular versions 2/3, correct?
If so, then ionic cli 3 (‘ionic 3’) is built to support angular 4.
But ultimately, I think you answered my question - ionic build w/ ionic/cli 2.x.x automatically built for ios. So that means I was wrong about how the www folder gets generated.
It is probably generated once you ionic serve
automatically.
Yes, Ionic 1, Ionic v1, Ionic1 or similar.
ionic
as command line command is the Ionic CLI - no matter what version.
Ionic as in “Ionic Framework” refers to Ionic 2 or newer - but it should be just called “Ionic”. (On the technical side this is also known as ionic-angular
as this is its name on npm)[quote=“ghostrunners, post:3, topic:90031”]
but now angular is now referred to version 2+, not version 1, or ng2.
[/quote]
Similar to Ionic v1 vs. Ionic there is AngularJS (Angular1) and Angular (Angular 2 and newer).[quote=“ghostrunners, post:3, topic:90031”]
with this in mind, ionic cli 2.x.x can only support angular versions 2/3, correct?
[/quote]
No, all CLIs (from v2 up) support all versions of Ionic.
Nope, Angular(JS) is different again:
Ionic v1 = AngularJS (Angular 1)
Ionic (v2.x.x) = Angular 2
Ionic (v3.x.x) = Angular 4
But you don’t have to worry about the Angular version at all if you are using (just) Ionic. It’s all Angular, no matter if the version number says 2 or 4. Only version 1 (JS) was different.
Yes, BUT: You can also run npm run build
to just build /src
to /www
. This is what ionic serve
and all the other commands do internally.
1 Like
I am also confused.
Before, you could do:
ionic run android --device
And then ionic would BUILD (generate the www files) and then start the cordova build and run process.
Now, because the docs are unclear, I don’t know how can I do this in ONE single command.
What is the exact process that has to be done? First a serve ? Or ionic build? In the docs it is not clear.
The exact same thing as before, just add ‘cordova’ after ‘ionic’.
ionic serve
generates the www folder - which I’m currently using to sync to a amazon s3 bucket for static hosting.
The ionic cli documentation does a pretty good job of explaining the [current] syntax - https://ionicframework.com/docs/cli/
But, before, in Ionic2 CLI, when you did that, there it made BUILD of ionic app, before deploying.
If I make changes to a TS file, then run:
cordova run android --device
Those changes will not be reflected. There is no pre-build.
Read @Sujan12’s post again. cordova
goes after ionic
, not in place of it.
My bad, totally. I must be blind today. Thanks.