1.0.1 • Published 4 years ago

react-native-asset-cleaner v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

react-native-asset-cleaner

Asset cleaner for React Native

Installation

yarn add -D react-native-asset-cleaner

or install it globally:

yarn global add react-native-asset-cleaner

Usage

Usage: [yarn] asset-cleaner [options] [command]

Asset cleaner for React Native

Options:
  -V, --version              output the version number
  -a, --asset <asset-dir>    Asset folder
  -s, --source <source-dir>  Source folder
  -h, --help                 display help for command

Convention

  • Place the asset folder outside of src
  • Setup babel-plugin-module-resolve to use absolutely import:
    require('assets/images/test-image.png');
  • Also setup paths config for Typescript.
    {
      "compilerOptions": {
        "baseUrl": ".",
        "paths": {
          "assets/*": [
            "./assets/*"
          ]
        }
      }
    }
1.0.1

4 years ago

1.0.0

4 years ago