架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 7013|回复: 1

[ionic] ionic项目相关的操作命令

[复制链接]
发表于 2018-6-27 10:36:25 | 显示全部楼层 |阅读模式
   _             _
  (_) ___  _ __ (_) ___
  | |/ _ \| '_ \| |/ __|
  | | (_) | | | | | (__
  |_|\___/|_| |_|_|\___|  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
QQ截图20180627102355.jpg

官网介绍: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
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2024-4-26 11:27

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表