同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
A bundle contains the following contents:
src directory for storing code files or code library
ohos_bundles folder for storing dependent bundles (It is automatically generated during bundle installation, without the need to submit to the code library.)
README.md file for describing the bundle
bundle.json file for declaring metadata of the bundle
LICENSE file for open-source code
my-bundle
|_ohos_bundles
|_src
|_bundle.json
|_README.md
|_LICENSE
Bundle code files are the same as those in a common code directory. The only difference lies in the open APIs (declared in header files) of a bundle, which are likely to be referenced by other bundles and need to be declared in the dirs of bundle.json.
README.md is a bundle self-description file using the markdown syntax. For details, see Syntax Reference.
To help you easily find and use the desired bundle on the HarmonyOS Package Manager (HPM) platform, a README file is provided in the root directory of each bundle.
The README file may include instructions on how to install, configure, and use the instance code in the bundle, as well as any other information helpful to you.
The README file is available in the bundle details page of the HPM platform.
A bundle.json file describes the metadata of a bundle. Each bundle has its own bundle.json file.
{
"name": "@myorg/demo-bundle",
"version": "1.0.0",
"license": "MIT",
"description": "bundle description",
"keywords": ["hos"],
"tags": ["applications", "drivers"],
"author": {"name":"","email":"","url":""},
"contributors":[{"name":"","email":"","url":""},{"name":"","email":"","url":""}],
"homepage": "http://www.foo.bar.com",
"repository": "https://git@gitee.com:foo/bar.git",
"publishAs": "source",
"dirs": {
"src": ["src/**/*.c"],
"headers": ["headers/**/*.h"],
"bin": ["bin/**/*.o"]
},
"scripts": {
"build": "make"
},
"envs": {},
"ohos": {
"os": "2.0.0",
"board": "hi3516",
"kernel": "liteos-a"
},
"rom": "10240",
"ram": "1024",
"dependencies": {
"@myorg/net":"1.0.0"
}
}
Each bundle.json file has the following fields:
name: a bundle name, which starts with @ and is separated by /, for example, @myorg/mybundle
version: a bundle version number, for example, 1.0.0. The version number must comply with the Semantic Versioning Specification (SemVer) standards.
description: a brief description of a bundle
dependencies: bundles that a bundle depends on
envs: parameters required for bundle compilation, including global parameters and dependency parameters.
scripts: commands executable to a bundle, such as those for compiling, building, testing, and burning
publishAs: bundle publishing type, which can be source, binary, distribution, or code-segment
dirs: directory structure (such as the header file) generated for publishing
ram&rom: statistical information about the estimated read-only memory (ROM) and random access memory (RAM) usage
ohos: mappings among OpenHarmony versions, development boards, and kernels, separated by commas (,).
Extended information: author, home page, code repository, license, tags, and keywords
base (only for a distribution): a base distribution which others inherit from.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。