https://golb.hplar.ch/p/Hot-deploy-updates-with-the-cordova-hot-code-push-plugin
npm install @angular/{common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router,animations}@latest typescript@latest --save
ionic start ionic3-angular4 --v2
https://www.becompany.ch/en/blog/2016/10/19/creating-apache-cordova-app-with-angular2
docker run -it --net host --cpuset-cpus 0 --memory 512mb -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY -v $HOME/Downloads:/root/Downloads --device /dev/snd --name arcwelder thshaw/arc-welder
http://www.phonegap100.com/article-489-1.html
ionic build android --prod --release 此方法构建的应用启动最快
http://blog.csdn.net/lucy_100/article/details/51028366
ionic build android --prod --release
https://dpary.github.io/2016/12/23/
http://forsigner.com/2015/03/12/ionic-android-package/
ompile_android:
stage: build
script:
- cp debug.keystore ~/.android/debug.keystore
- npm install
- cordova platform update android
- ionic config build
- ionic state restore
- ionic build android
docker run -it --net host --cpuset-cpus 0 --memory 512mb -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --volumes-from=data --name arcwelder thshaw/arc-welder
https://zhuanlan.zhihu.com/p/21566093
install jdk
https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
ionic start myTabs tabs --v2
sudo npm install -g cordova ionic ios-sim
ionic start myApp blank
ionic start myApp tabs
ionic start myApp sidemenu
chrome://apps/
===
cordova create myApp
cd myApp
cordova platform add android
====
http://blog.csdn.net/qq_15096707/article/details/53846895
cd myIonicApp
ionic platform add ios
ionic build ios
ionic prepare ios 重新打包
ionic emulate ios (模拟器运行)
ionic emulate ios -livereload
ionic platform remove ios
onic start sidemenuApp sidemenu --v2
https://github.com/driftyco
https://github.com/driftycoz
cd myIonicApp
ionic serve
ionic platform add android
ionic build android
ionic emulate android (模拟器运行)
ionic run android (连接上手机运行)
ionic prepare android 重新打包
ionic platform remove android 移除环境
http://www.jianshu.com/p/dfd98ad47af1 打包
====================================
http://kaibin.me/2016/07/17/ionic-hotcode/
sudo npm install -g ionic cordova
npm install -g cordova-hot-code-push-cli
cordova plugin add cordova-hot-code-push-plugin
cordova build
cordova-hcp server
config.xml
chcp.json
$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios
install jdk
agileek/ionic-framework
https://www.oschina.net/question/576444_2167064
android update sdk --no-ui
http://www.jianshu.com/p/9e3cd54f5f97
http://www.cnblogs.com/johnzhu/p/5830450.html
http://blog.csdn.net/cydd007/article/details/52366982
npm install -g cordova-hot-code-push-cli(用来动态生成chcp.json和chcp.manifest两个文件)
cordova plugin add cordova-hot-code-push-plugin (插件)
cordova plugin add cordova-hot-code-push-local-dev-addon(ps:这个插件装不装其实也没有影响,因为我们不是要求实时更新界面的,而且在正式发布App的时候必须得移除这个插件)
cordova build
{
"content_url": "http://localhost:8080/www",
"autogenerated": true,
"update": "now",
"release": "2017.01.04-14.30.44"
}
1.config.xml添加节点如下:
<chcp>
<config-file url="http:/yourserver/www/chcp.json" />
</chcp>
A、chcp.json文件内容说明
{
"autogenerated": true,
"release": "2016.08.29-15.52.14", //版本号
"content_url": "http://www.123.com/www/",//WWW文件夹所在远程地址
"update": "now"//分三种情况
// start - app启动时安装更新. 默认值.
// resume - app从后台切换过来的时候安装更新.
// now - web内容下载完毕即安装更新.
}
该文件每次运行cordova-hcp build 都会自动重新生成,为了方便,可以在APP项目的根目录下添加一个模板文件cordova-hcp.json,内容如下:
{
"autogenerated": true,
"release": "2016.08.29-16.52.27",
"content_url": "http://www.123.com/www/",
"update": "start"
}
var testButton=document.getElementById("testButton");
function handlerTest()
{
var oEvent=window.event;//for IE
//var oEvent=arguments[0];// for DOM
if(oEvent.type=="click")
{
alert("click");
}
else if(oEvent.type=="mouseover")
{
alert("mouseover");
}
else
{
alert(oEvent.keycode);
}
}
testButton.onclick=handlerTest;
testButton.onmouseover=handlerTest;