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

react-native-oss-license

v0.7.0

Published

License list generator for react-native app

Downloads

9,122

Readme

react-native-oss-license

npm badge
react-native-oss-license is license list generator for React Native App(iOS & Android).
It generates license lists of npm libraries for iOS, Android.
This CLI tool allow you to easily generate content of oss-license.

Installation

npm i -g react-native-oss-license

Sample App

Usage

iOS

Recommended to use with LicensePlist that scan cocoaopds, carthage.

LicensePlist

react-native-oss-license generate plist that you can locate to Settings.bundle.
Run react-native-oss-license --format settings-bundle when your are in the directory that contains package.json You can merge output react-native-oss-license and LicensePlist.

Android

It is assumed to be used with other tools.

LicenseToolsPlugin

License Tools Plugin for Android is Gradle plugin to check library licenses and generate license pages.
Run react-native-oss-license --format license-tools-plugin. It generate license list in YAML format.
react-native-oss-license generate same format content. You can merge results.

AboutLibraries(under v8.9.4)

AboutLibraries provides fragment/activity that show license list.
react-native-oss-license generate string resource xml AboutLibraries use.
Run react-native-oss-license --format about-libraries, output strings.xml that you can put into res/values/.
and output stdout withLibraries("package_name_A", "package_name_B" ...) that pass to method withLibraries.

AboutLibraries(over v10.0.0)

AboutLibraries provides Jetpack Compose that show license list.
react-native-oss-license generate JSON files AboutLibraries use.
Run react-native-oss-license --format about-libraries-json, output .json that you can put into config.
config/libraries contains libraries json files. config/licenses contains licenses json files. You can specify any other directory instead of config with --output-path option.

CLI

> cd {project-root}
> react-native-oss-license --help
Usage: react-native-oss-license [options]

Options:
  -f, --format <format>       output format. options:[settings-bundle,license-tools-plugin,about-libraries, about-libraries-json]
  --dev                       include devDependencies (default: false)
  --depth <depth>             dependencies depth (default: null)
  --output-path <outputPath>  specify path where output file
  --json                      output json to stdout (default: false)
  --add-version-number        write library version number (default: false)
  --only-direct-dependency    output only dependencies you write packages.json. (default: false)
  --skip-not-required         skip licenses those not require copyright notice (default: false)
  --bundle-id <bundleId>      unique id of your app.  It is used for output such as "plist" filename, etc. (default: null)
  --uses-plugin               whether AboutLibraries android plugin is used on native side as well (default: false)
  --version                   show current version
  -h, --help                  output usage information

> react-native-oss-license --format settings-bundle
output settings-bundle format to 'ios/com.k-tomoyasu.react-native-oss-license.Output'

screen-shots

iOS

settings-bundle-list settings-bundle-detail

Android

license-tools-plugin

license-tools-plugin

AboutLibraries

about-libraries

Acknowledgment

This is based on dart-oss-licenses consepts.
And referred license-list.