npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cordova-ohos/cordova-plugin-buildinfo

v4.0.0

Published

Cordova buildinfo Plugin

Readme

cordova-plugin-buildinfo

一个 Cordova 插件,用于在多个平台(iOS、Android、浏览器等)上获取 Cordova 应用的构建信息和环境信息。

功能特性

  • 获取基础应用信息:名称、版本号、构建号、包名/.Bundle ID

  • 访问构建环境变量(需配置)

支持的平台

  • Android(API 级别 21+)

  • iOS(11.0+)

  • 浏览器(Browser)

  • OHOS 5.0+

安装方法

Cordova 命令行工具


# 安装hcordova
npm install -g hcordova

# 全平台安装
hcordova plugin add cordova-plugin-buildinfo

# 指定鸿蒙平台安装
hcordova plugin add cordova-plugin-buildinfo --platform ohos

安装特定版本


hcordova plugin add [email protected] --platform ohos

卸载插件

# 全平台卸载
hcordova plugin remove cordova-plugin-buildinfo

# 指定鸿蒙平台卸载
hcordova plugin remove cordova-plugin-buildinfo --platform ohos

使用说明

插件暴露全局对象 BuildInfo,获取属性。

基础示例


function getBuildInfo() {
    var buildInfo = "";
    buildInfo += ('BuildInfo.baseUrl        =' + BuildInfo.baseUrl+"<br />");
    buildInfo += ('BuildInfo.packageName    =' + BuildInfo.packageName+"<br />");
    buildInfo += ('BuildInfo.basePackageName=' + BuildInfo.basePackageName+"<br />");
    buildInfo += ('BuildInfo.displayName    =' + BuildInfo.displayName+"<br />");
    buildInfo += ('BuildInfo.name           =' + BuildInfo.name+"<br />");
    buildInfo += ('BuildInfo.version        =' + BuildInfo.version+"<br />");
    buildInfo += ('BuildInfo.versionCode    =' + BuildInfo.versionCode+"<br />");
    buildInfo += ('BuildInfo.debug          =' + BuildInfo.debug+"<br />");
    buildInfo += ('BuildInfo.buildType      =' + BuildInfo.buildType+"<br />");
    buildInfo += ('BuildInfo.flavor         =' + BuildInfo.flavor+"<br />");
    buildInfo += ('BuildInfo.buildDate      =' + BuildInfo.buildDate+"<br />");
    buildInfo += ('BuildInfo.installDate    =' + BuildInfo.installDate+"<br />");
    document.getElementById("buildInfo").innerHTML = buildInfo;
}

鸿蒙支持的属性

|属性|说明| |----|----| |BuildInfo.packageName|包名称对于bundleName| |BuildInfo.basePackageName| 包名称对于bundleName| |BuildInfo.displayName|应用名称| |BuildInfo.name|应用名称| |BuildInfo.version|应用版本号| |BuildInfo.versionCode|应用版本code| |BuildInfo.debug|是否debug| |BuildInfo.buildType|编译类例如debug/release|

许可证

本插件基于 Apache License 2.0 开源,详见 LICENSE 文件。

联系方式

OHOS Cordova https://gitcode.com/OpenHarmony-Cordova/cordova-plugin-buildinfo

Android/iOS:https://npmjs.com/cordova-plugin-buildinfo/issues