生产任务准备离子应用程序 [英] Tasks for production prepared Ionic app
问题描述
我试图找出从代码传递给最终可部署的apk / ipa的最好的进程。 远远我有一个使用Karma + Jasmine的测试套件,它将TypeScript转换为JS并运行一些单元测试。我通过喝酒开始这个过程。 之后,我所知道的是 因此,请记住代码必须尽可能隐私,对 例如, 我有点失落了,唯一能想到的是测试应该先运行,因为在测试失败的情况下,应该放弃这个过程。 试试 ionic-app-scripts > = 0.0.48 to config build。 制作:
但我不确定如何破解/缩小生成的apk。
离子建造
的缩小和破坏是否足够了,还是应该通过大量的手工来完成所有这些预建任务?
在这种情况下,我应该运行什么样的正确任务,是否必须手动将所有TypeScript文件转换为JS?我应该以什么顺序运行这些任务?
transpile - >测试 - >缩小 - > uglify - >构建apk
或 minify - > uglify - > transpile - >测试 - >构建apk
$ b $要检查缩小的文件,用 ionic build android --prod
GNOME Archive Manager
(或类似)打开apk文件并提取 /assets/www/build/js/app.bundle.js
档案。
I'm trying to figure out what's the best process to pass from the code to the final deployable apk/ipa.
So far I have a testsuite using Karma + Jasmine, which transpiles the TypeScript to JS and runs some unit tests. I start that process via gulp.
After that all I know is to ionic build android --release
what generates (an unsigned yet) apk.
But I'm not sure of how ofuscated/minificated the generated apk is.
So, keeping in mind the code has to be as private as possible, is the minification and the ofuscation of the ionic build
enough or should I do all those prebuild tasks manually via gulp?
And in that case, whats are the right tasks I should run, do I have to transpile all the TypeScript files to JS manually? and in what order should I run the tasks?
E.g. transpile -> tests -> minify -> uglify -> build apk
or minify -> uglify -> transpile -> tests -> build apk
I'm a bit lost with this, and the only thing I can figure out is that the tests should be ran first, because is case of test failure the process should be aborted.
Try ionic-app-scripts >= 0.0.48 to config build.
Production:
ionic build android --prod
To check the minified file, open the apk file with GNOME Archive Manager
(or similiar) and extract /assets/www/build/js/app.bundle.js
file.
这篇关于生产任务准备离子应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!