问题
Is there any ways to generate apk or ios file with using only node.js ?
most of solutions doesn't work or need some addition applications to build the application as apk/ios.
回答1:
The solution of generating our application as "apk" or "ios" are so easy and fast and first of all open cmd screen with path of your application by using "shift + right click" on any place of your app folder > "open command windows here" and follow the steps
For APK, enter:
ionic package build android
For IOS, enter:
ionic package build ios
This process will take few minutes (just wait until the end)
Next step To download our apk/ios file, just enter:
ionic package download
when downloading completed, you will find the apk/ios file in the same path of your application
Very important note: sometime downloading process will display error message such as "your application not ready to download".
The solution very simple, just try to wait one or two minutes and re-write downloading command.
Finally, These commands tested on Ionic 2 so I'm not sure if its works with other Ionic versions.
来源:https://stackoverflow.com/questions/46040847/how-to-generate-ionic-apk-or-ios-without-extra-applications