Alex Dai Playground

[Ionic] cli

| Comments

cmd
// 開發環境資訊
ionic info

更新套件
npm update -g cordova ionic

更新 lib 中的 js
ionic lib update

// Saved platform 、plugins 、package.json
ionic state save

// restore via  package.json
ionic state restore

ionic state reset
ionic state clear

ionic browser list

// ionic browser revert android
ionic platform remove android
ionic browser rm crosswalk
ionic platform add android
ionic browser add crosswalk or ionic browser add crosswalk-lite
ionic build android

// remove platform
cordova platform remove android
cordova platform remove ios
cordova platform remove browser

// save plugin & platform to config.xml
cordova plugin save
cordova platform save

// restore plugin & platform from config.mxl
cordova prepare

// show plugin list
ionic(cordova) plugin list

// remove cordova plugin
cordova plugin remove "name"

// android & iso
ionic serve --lab

// port address
ionic serve --port 8100 --address localhost

// Config : .io-config.json
ionic config info
ionic config build
ionic config set CONFIG_KEY VALUE
ionic config unset CONFIG_KEY

// add gmc
ionic config set gcm_key <project_number>
ionic push --google-api-key <api_key>
ionic add ionic-service-core
ionic config build

// upload app to ionic
ionic login
ionic upload
ionic share EMAIL

// Crosswalk
ionic browser list
ionic browser add crosswalk
ionic browser add crosswalk@10.39.235.15 
ionic browser revert android // 移除該平台的瀏覽器
ionic browser rm crosswalk

remove all plugin

$ cordova plugin -l | awk '{print $1}' | xargs cordova plugins rm

save plugin platform

$ cordova plugin save; cordova platform save

重新安裝套件

via ionic

$ ionic platform remove android; ionic platform remove ios; ionic platform remove browser; ionic state restore; ionic state save;

via cordova

$ cordova platform remove android; cordova platform remove ios; cordova platform remove browser;cordova prepare

Comments

comments powered by Disqus