react-native-shared-code
Calculates the percentage of shared code across platforms and the percentage of platform specific code in your React Native project.
Last updated 3 years ago by fdnhkj .
Original npm · Tarball · package.json
$ cnpm install react-native-shared-code 
SYNC missed versions from official npm registry.

react-native-shared-code

Analyses your React Native project and calculates the percentage of

  • shared code across platforms
  • platform specific code

Formula

The formulas are based on the two ways of targeting specific platforms in React Native:

Shared code

shared code

Platform specific

platform specific

Usage

Installation

You can install react-native-shared-code either as a global package or a local module.

Global package

npm install -g react-native-shared-code
react-native-shared-code path-to-react-native-project

Local package

npm install --save-dev react-native-shared-code

Add shared-code script to your package.json

{
  "scripts": {
    "shared-code": "react-native-shared-code"
  }
}

API

  Usage: react-native-shared-code [path] [options]


  Commands:

    [path]     path to React Native project (default value is cwd)

  Options:

    -h, --help    output usage information
    -v, --version output the version number
    -p, --platform platform for which to calculate the shared code percentages.
                   Accepted values are ios, android and windows.
                   By default, it detects index.platform.js for android, ios, windows
    --verbose output debugging info

Author

Fidan Hakaj

Acknowledgments

Current Tags

  • 0.0.2                                ...           latest (3 years ago)

2 Versions

  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |