Ionic 2 command to just compile the mobile web files


#1

Is there a way with the ionic cli command to just build the mobile web files in ./www without starting a server. Basically do what “ionic serve” does to compile but then immediately exit.


#2

So are you asking to just start a simple server and display the contents of www?
Currently this is not a feature of the CLI.


#3

Not quite. I don’t want to start the server, I just want to “compile” the application so it generates the JS, CSS, fonts, and HTML into the www directory. It doesn’t look like the ionic cli is using webpack for anything besides the JS or would just call webpack directly to do this.


#4

It’s doing a bit more than just webpack. It’s also handling scss compilation and the transferring of templates.
Right now, this is hard coded into the CLI, so it’s not possible to call it directly, but the tooling is constantly being worked on, so if you open an issue for it, we can take a look and consider adding it :smile:


#5

Isn’t this what the ionic prepare ios or ionic prepare android command does?

Well, it does in ionic v1 anyway.