Ionic3 demo TallyBook 实例1

1.创建项目

   ionic start  TallyBook  blank  创建一个空的项目

   ionic cordova  platform  add android   添加andorid平台

   ionic serve  浏览器查看

   ionic cordova build android --prod --release  编译apk 安装运行

   备注:如果有问题找对应的脚本执行

      npm config set registry https://registry.npm.taobao.org  代理设置

      modules 错误:

     npm install rimraf -g  

     rimraf node_modules

     npm clean cache 
     npm update 

    android update sdk --no-ui --filter android-26

2.创建项目目录说明

 

node_modules:node 各类依赖包

platforms:项目添加的平台  一般就android  ios

plugins:项目中的插件

resources:资源文件  一般有启动画面 和图标

src:项目代码   app( 应用根目录)、 assets(资源目录)、  pages( 页面文件)、 theme(主题文件)

www:静态文件

.editorconfig:编辑器的配置文件

.gitignore:git 配置文件

config.xml:打包成 app 的配置文件

package.json:配置项目的元数据和管理项目所需要的依赖

tsconfig.json:typeScript 项目的根目录,指定用来编译这个项目的根文件和编译选项

tslint.json:格式化和校验 typescript

3.创建页面和组件命令

  ionic  g page  页面名称

  ionic  g component  组件名称

4.替换图标和启动页

   替换 icon.png 文件   替换 splash.png

   在根目录下面运行 ionic  cordova  resources andorid    (需要登录 ionic signup)

 

猜你喜欢

转载自www.cnblogs.com/linsu/p/9164539.html