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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ccgo/hvigor-ohos-plugin

v0.0.3

Published

Convention plugins for CCGO cross-platform C++ projects - OpenHarmony/HarmonyOS hvigor build tools

Readme

CCGO Hvigor Plugins

License: MIT npm version

Convention plugins for CCGO cross-platform C++ projects - OpenHarmony/HarmonyOS hvigor build tools.

Overview

This package provides hvigor plugins that integrate with CCGO's cross-platform build system for OpenHarmony/HarmonyOS projects. These plugins are published to npm and can be consumed by any CCGO project.

Requirements

  • Node.js >= 18.0.0
  • DevEco Studio with hvigor (provides @ohos/hvigor)
  • CCGO CLI tool

Installation

npm install @ccgo/hvigor-ohos-plugin --save-dev

Or add to your oh-package.json5:

{
  "devDependencies": {
    "@ccgo/hvigor-ohos-plugin": "^0.0.1"
  }
}

Available Plugins

archivePlugin

Builds native C++ libraries and packages them into a HAR (Harmony Archive) file.

Features:

  • Builds native libraries using CCGO
  • Packages HAR using hvigorw
  • Copies artifacts to target/{debug|release}/ohos/
  • Supports both debug and release builds

Usage:

In your module's hvigorfile.ts (e.g., ohos/main_ohos_sdk/hvigorfile.ts):

import { harTasks } from '@ohos/hvigor-ohos-plugin';
import { archivePlugin } from '@ccgo/hvigor-ohos-plugin';

export default {
    system: harTasks,
    plugins: [archivePlugin()]
}

Run the build:

# From the ohos/ directory
hvigorw buildHAR --mode module -p module=main_ohos_sdk@default

Options:

archivePlugin({
    // Custom native build command (default: 'ccgo build ohos --native-only')
    nativeBuildCommand: 'ccgo build ohos --native-only',

    // Custom HAR assembly command
    harAssembleCommand: 'hvigorw assembleHar --mode module -p product=default --no-daemon --info',

    // Whether to copy HAR to target directory (default: true)
    copyToTarget: true,
})

Project Structure

ccgo-hvigor-plugins/
├── src/
│   ├── index.ts                 # Main exports
│   ├── plugins/
│   │   └── archive-plugin.ts    # Archive plugin implementation
│   └── types/
│       └── @ohos/
│           └── hvigor.d.ts      # Type definitions for @ohos/hvigor
├── dist/                        # Compiled output (generated)
├── package.json
├── tsconfig.json
└── README.md

Development

Build

npm run build

Local Testing

  1. Build the package:

    npm run build
  2. Link locally:

    npm link
  3. In your CCGO project:

    npm link @ccgo/hvigor-ohos-plugin

Publishing

# Login to npm (first time only)
npm login

# Publish
npm publish --access public

Integration with CCGO Template

When using CCGO template, update the generated ohos/main_ohos_sdk/hvigorfile.ts:

Before (local plugin):

import { harTasks } from '@ohos/hvigor-ohos-plugin';
import { archivePlugin } from '../hvigor/archive-plugin';

export default {
    system: harTasks,
    plugins: [archivePlugin()]
}

After (remote plugin):

import { harTasks } from '@ohos/hvigor-ohos-plugin';
import { archivePlugin } from '@ccgo/hvigor-ohos-plugin';

export default {
    system: harTasks,
    plugins: [archivePlugin()]
}

Environment Variables

  • CCGO_CI_BUILD_IS_RELEASE - Set to 1 or true for release builds (affects output directory)

License

MIT License - see LICENSE file for details.

Related Projects

Contributing

This project is part of the CCGO ecosystem. For contribution guidelines, see the main CCGO repository.