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 🙏

© 2024 – Pkg Stats / Ryan Hefner

zzc-react-native-cli

v1.4.1

Published

为了统一租租车的整个React Native的版本环境,以及使用同样的目录结构,所以开发出一个自动化创建工程目录的脚手架工具。所有新的RN项目都应该使用该脚手架来创建工程。

Downloads

1

Readme

租租车App React Native脚手架。

为了统一租租车的整个React Native的版本环境,以及使用同样的目录结构,所以开发出一个自动化创建工程目录的脚手架工具。所有新的RN项目都应该使用该脚手架来创建工程。

安装

脚手架工具需要安装到全局的node_modules中

znpm install zzc-react-native-cli -g

验证是否安装成功

zrn -v

如安装成功则会出现版本号。

使用

创建一个空白的工程目录,然后使用zrn来构建项目。

zrn init -n <project name>

创建完成后目录中将会出现以下结构:

├── __tests__ // RN测试文件 
├── src // 项目业务代码存放文件
├── .buckconfig
├── .flowconfig
├── .gitattributes
├── .gitignore
├── .watchmanconfig
├── App.js
├── app.json
├── babel.config.js
├── index.js
├── metro.config.jsmetro.config.js
├── package.json
├── zrn.cli.config.j

帮助

运行-help命令来获得帮助

zrn --help

构建

运行 bundle命令来构建你的应用

zrn bundle -t <ios|android 默认all>

更多的参数配置可以参考--help来获得。

更新

切勿自行更新自己项目中的RN以及一切和RN相关的文件,例如React,简单来说,项目初始化时就已经存在的依赖请勿自行更新,如果需要更新版本来获得一些新的特性,请联系原生开发组以及我来更新脚手架的配置进行更新。

zrn update

update命令会将脚手架中最新的配置更新到项目的package中,然后需要您自行install即可。

安卓apk构建及安卓

zrn build-apk      // 构建apk
zrn install-apk     // 安卓apk到设备

配置文件

配置文件会在执行init命令时自动创建,可后期自行根据需求修改。 以下为默认配置:

module.exports = {
    iosBundlePath: './ios/RNProject/bundle', // ios bundle file path
    iosBundleStaticPath: './ios/RNProject/bundle', // ios bundle static file path
    androidBundlePath: './android/rnLib/src/main/assets', // android bundle file path
    androidBundleStaticPath: './android/rnLib/src/main/res/', // android bundle static file path
    iosBundleName: 'index.ios.jsbundle', // ios bundle file name
    androidBundleName: 'index.android.bundle', // android bundle file name
    backupPath: 'rn_bundle', // backup ios and android bundle files dir path
    androidAPKPath: './android/app/build/outputs/apk/channelDefEnvDef/release/zuzuChe-release_channelDefEnvDef.apk' // build android apk output path
}