<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
# Cordova Hooks
This directory may contain scripts used to customize cordova commands. This
directory used to exist at `.cordova/hooks`, but has now been moved to the
project root. Any scripts you add to these directories will be executed before
and after the commands corresponding to the directory name. Useful for
integrating your own build systems or integrating with version control systems.
__Remember__: Make your scripts executable.
## Hook Directories
The following subdirectories will be used for hooks:
after_build/
after_compile/
after_docs/
after_emulate/
after_platform_add/
after_platform_rm/
after_platform_ls/
after_plugin_add/
after_plugin_ls/
after_plugin_rm/
after_plugin_search/
after_prepare/
after_run/
after_serve/
before_build/
before_compile/
before_docs/
before_emulate/
before_platform_add/
before_platform_rm/
before_platform_ls/
before_plugin_add/
before_plugin_ls/
before_plugin_rm/
before_plugin_search/
before_prepare/
before_run/
before_serve/
pre_package/ <-- Windows 8 and Windows Phone only.
## Script Interface
All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:
* CORDOVA_VERSION - The version of the Cordova-CLI.
* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
* CORDOVA_HOOK - Path to the hook that is being executed.
* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)
If a script returns a non-zero exit code, then the parent cordova command will be aborted.
## Writing hooks
We highly recommend writting your hooks using Node.js so that they are
cross-platform. Some good examples are shown here:
[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
Also, note that even if you are working on Windows, and in case your hook scripts aren't bat files (which is recommended, if you want your scripts to work in non-Windows operating systems) Cordova CLI will expect a shebang line as the first line for it to know the interpreter it needs to use to launch the script. The shebang line should match the following example:
#!/usr/bin/env [name_of_interpreter_executable]
没有合适的资源?快使用搜索试试~ 我知道了~
useCordovaBluetoothPrinter:使用cordova蓝牙打印机打印
共32个文件
js:14个
json:3个
html:3个
需积分: 31 1 下载量 12 浏览量
2021-06-27
23:16:46
上传
评论
收藏 35KB ZIP 举报
温馨提示
Cordova 项目 - angularjs。 使用 org.apache.cordova.sipkita BluetoothPrinter 插件的示例 运行应用程序: 首先我们安装 grunt 和 bower 的依赖: npm install bower install 我们为android添加平台: cordova platform add android 安装插件: cordova plugin add https://github.com/eddysby2000/Cordova-Bluetooth-Printer-Plugin.git 要生成 apk: cordova build 要在模拟器中运行: cordova run android 在此示例中,斑马 iMz320 打印机连接到移动设备。 该项目是使用 yeoman 创建的,使用生成器
资源详情
资源评论
资源推荐
收起资源包目录
useCordovaBluetoothPrinter-master.zip (32个子文件)
useCordovaBluetoothPrinter-master
.jshintrc 646B
www
.gitignore 71B
bower.json 528B
protractor-desktop-config.js.js 583B
Gruntfile.js 13KB
.travis.yml 84B
README.md 858B
.bowerrc 28B
config.xml 500B
.yo-rc.json 39B
.editorconfig 214B
hooks
README.md 3KB
before_build
010_grunt_build.js 306B
.gitignore 210B
app
index.html 3KB
modules
core
core.js 386B
views
home.html 204B
prueba.html 771B
controllers
prueba.js 2KB
home.js 392B
config
routes.js 1KB
tests
unit
prueba-controller.spec.js 481B
home.spec.js 556B
e2e
home
home.spec.js 1KB
home.po.js 943B
img
loaders
loader.gif 14KB
js
application.js 694B
config.js 926B
css
demo.css 6KB
customcordova.css 184B
karma.conf.js 3KB
package.json 2KB
共 32 条
- 1
可吸不是泥
- 粉丝: 26
- 资源: 4552
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2023-04-06-项目笔记 - 第三百一十九阶段 - 4.4.2.317全局变量的作用域-317 -2025.11.16
- 2023-04-06-项目笔记 - 第三百一十九阶段 - 4.4.2.317全局变量的作用域-317 -2025.11.16
- 1503ANDH1503002016_20241116222825
- 时间序列-黄金-15秒数据
- C#HR人事管理系统源码数据库 MySQL源码类型 WebForm
- C#CS餐饮管理系统源码数据库 SQL2008源码类型 WinForm
- 蛾类识别系统(深度学习+UI可视化)
- 时间序列-黄金-5秒数据
- java版ssm企业工资管理系统源码数据库 MySQL源码类型 WebForm
- 树洞漫画_1.0.2.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0