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

@epig/rn-baselib

v1.1.12

Published

## 安装 ```bash npm i @epig/rn-baselib --save react-native link ```

Downloads

110

Readme

@epig/rn-baselib

安装

npm i @epig/rn-baselib --save
react-native link

依赖到的第三方库

need react-native link

  1. react-native-linear-gradient (渐变控件);
  2. react-native-vector-icons (SVG图片);
  3. react-native-gesture-handler(react-navigation 3.x依赖);
  4. react-native-spinkit (Loading动画);

模块

components

抽离封装的UI控件

styles

样式模块

tools

公用方法模块

model

创建model模块

tips

自定义主题颜色

  1. 要自定义默认的主题颜色值(在./styles/theme.ts), 可以在项目根目录下新建一个theme.json文件, 在此文件内添加对应的颜色值; 如果key./styles/theme.ts内的key相同则会覆盖, 如果没有相同的key, 则会新增颜色值.
  2. 在项目根目录下执行: node node_modules/@epig/rn-baselib/styles/custom.cli.js

权限管理

iOS

用到某个权限需在 info.plist 添加如下对应项

  • 读取相册: Privacy - Photo Library Usage Description
  • 保存图片至相册: Privacy - Photo Library Additions Usage Description
  • 相机: Privacy - Camera Usage Description
  • 定位:
    • Privacy - Location When In Use Usage Description
    • Privacy - Location Usage Description
    • Privacy - Location Always Usage Description
    • Privacy - Location Always and When In Use Usage Description
  • 通讯录: Privacy - Contacts Usage Description

Android

用到某个权限需在 AndroidManifest.xml 添加如下对应项

  • 读取相册: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  • 存入相册: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  • 相机: <uses-permission android:name="android.permission.CAMERA"/>
  • 定位:
    • <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    • <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    • <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
  • 读取通讯录: <uses-permission android:name="android.permission.READ_CONTACTS"/>
  • 编辑通讯录: <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
  • 读取短信: <uses-permission android:name="android.permission.READ_SMS"/>
  • 编辑短信: <uses-permission android:name="android.permission.WRITE_SMS"/>
  • 接收短信: <uses-permission android:name="android.permission.RECEIVE_SMS"/>
  • 发送短信: <uses-permission android:name="android.permission.SEND_SMS"/>
  • 读取通话记录: <uses-permission android:name="android.permission.READ_CALL_LOG"/>
  • 编辑通话记录: <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
  • 获取ip, wifi的mac地址: <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>