|
_ _
(_) ___ _ __ (_) ___
| |/ _ \| '_ \| |/ __|
| | (_) | | | | | (__
|_|\___/|_| |_|_|\___| CLI 3.20.0
Usage:
$ ionic <command> [<args>] [--help] [--verbose] [--quiet] [--no-interactive] [--confirm] [options]
Global Commands:
config <subcommand> ...... Manage CLI and project config values (subcommands: get, set)
docs ..................... Open the Ionic documentation website
info ..................... Print system/environment info
login .................... Login with your Ionic ID
signup ................... Create an Ionic account
ssh <subcommand> ......... Commands for configuring SSH keys (subcommands: add, delete, generate, list, setup, use)
start .................... Create a new project
telemetry ................ (deprecated) Opt in and out of telemetry
Project Commands:
build .................... Build web assets and prepare your app for any platform targets
cordova <subcommand> ..... Cordova functionality (subcommands: build, compile, emulate, platform, plugin, prepare,
requirements, resources, run)
doctor <subcommand> ...... Commands for checking the health of your Ionic project (subcommands: check, ignore, list) generate ................. Generate pipes, components, pages, directives, providers, and tabs (ionic-angular >=
3.0.0) (alias: g)
git <subcommand> ......... Commands relating to git (subcommands: remote)
integrations <subcommand> Add or disable various integrations in your app (subcommands: disable, enable)
link ..................... Connect your local app to Ionic
monitoring <subcommand> .. Commands relating to Ionic Pro error monitoring (subcommands: syncmaps)
serve .................... Start a local dev server for app dev/testing
官网介绍:https://ionicframework.com/docs/cli/commands.html
创建项目
ionic start myApp blank 创建一个空白的app项目
ionic start myApp tabs 创建一个带有tabs项目
ionic start myApp sidemenu 创建一个带有滑动的项目
使用Cordova
ionic cordova --help 查看帮助
ionic cordova platform add ios 添加ios平台
ionic cordova platform add android 添加安卓平台
更多资料参考:https://cordova.apache.org/docs/en/latest/guide/cli/index.html
ionic generate
ionic g page [name] 添加页面
ionic g component [name] 创建组件
更多例子如下:
$ ionic generate
$ ionic generate component
$ ionic generate directive
$ ionic generate page
$ ionic generate pipe
$ ionic generate provider
$ ionic generate tabs
$ ionic generate component foo
$ ionic generate page Login
$ ionic generate page Detail --no-module
$ ionic generate page About --constants
$ ionic generate pipe MyFilterPipe
|
上一篇:理解Ionic、Angular、Cordova及插件之间的关系下一篇:ionic 修改android包名,ios appId
|