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

rn4oh

v1.0.1

Published

CLI tool for RN4OH project initialization

Readme

RN4OH CLI

RN4OH CLI 是一个命令行工具,用于快速创建和初始化 React Native for OpenHarmony 项目。

使用方式

方式一:使用 npx(推荐)

无需安装,直接使用:

npx rn4oh init my-project

指定版本:

npx rn4oh init my-project -v 1.0.0

查看版本:

npx rn4oh versions

方式二:全局安装

  1. 安装:
npm install -g rn4oh
  1. 使用:
# 查看版本
rn4oh --version

# 查看可用的模板版本
rn4oh versions

# 创建最新版本的项目
rn4oh init my-project

# 创建指定版本的项目
rn4oh init my-project -v 1.0.0

项目结构

初始化后的项目包含以下主要部分:

  • iOS 应用
  • Android 应用
  • OpenHarmony 应用
  • React Native 代码

开发流程

  1. 进入项目目录:
cd my-project
  1. 安装依赖:
npm install
  1. 启动开发服务器:
npm start
  1. 运行应用:

iOS:

npm run ios

Android:

npm run android

OpenHarmony:

npm run oh:dev

注意事项

  1. 确保已安装必要的开发环境:

    • Node.js (推荐 v14 或更高版本)
    • Git
    • Xcode (用于 iOS 开发)
    • Android Studio (用于 Android 开发)
    • DevEco Studio (用于 OpenHarmony 开发)
  2. 项目名称要求:

    • 只能包含小写字母、数字和连字符
    • 不能以数字或连字符开头
    • 不能包含大写字母或特殊字符
  3. 版本选择:

    • 使用 rn4oh versions 查看所有可用版本
    • 不指定版本时将使用最新版本
    • 指定的版本必须存在,否则会报错

常见问题

  1. 如果遇到权限问题,请确保已正确配置 Git SSH 密钥。

  2. 如果安装过程中断,请删除已创建的项目目录后重试。

  3. 确保目标目录不存在同名文件夹。

更新日志

v1.0.0

  • 初始版本发布
  • 支持项目初始化
  • 支持版本选择
  • 支持模板更新

许可证

MIT License

贡献指南

欢迎提交 Issue 和 Pull Request。