@contentsquare/react-native-cli
v1.1.0
Published
CLI tool from Contentsquare to upload source maps for React Native apps
Maintainers
Keywords
Readme
@contentsquare/react-native-cli
A Command Line Interface (CLI) tool for Contentsquare used to upload mapping files for React Native apps.
Installation
yarn add @contentsquare/react-native-cli --devConfiguration
The upload command requires the following information:
The targeted platform
iosorandroidThe project ID
- Login to the Contentsquare platform on https://app.contentsquare.com
- Make sure to be on the right project
- The project ID can be found in the URL query parameter
project:https://app.contentsquare.com/#/{MODULE_NAME}?project={PROJECT_ID}&hash={HASH}]
Valid API credentials
Follow the dedicated documentation from the Help Center to get the client ID and client Secret: How to create API credentials.
Using JSON file
You can provide this information by adding a contentsquare-cli.json file at the root of your project.
{
"android": {
"clientId": "[ANDROID CLIENT ID]",
"clientSecret": "[ANDROID CLIENT SECRET]",
"projectId": "[ANDROID PROJECT ID]",
"sourcemapPath": "[PATH TO SOURCEMAP IN ANDROID PROJECT]"
},
"ios": {
"clientId": "[IOS CLIENT ID]",
"clientSecret": "[IOS CLIENT SECRET]",
"projectId": "[IOS PROJECT ID]",
"sourcemapPath": "[PATH TO SOURCEMAP IN IOS PROJECT]"
}
}Using command line arguments
Alternatively, this information can be added as arguments directly on the command line
| Option | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| --client-id | The client ID of API credentials |
| --client-secret | The client secret of API credentials |
| --config | The path to the configuration file relative to project root |
| --help | Display the help message |
| --platform | The platform to target: ios or android |
| --project-id | The project ID |
| --sourcemap-path | The path to the sourcemap file |
| --upload-url | The URL of the Contentsquare platform, default value: https://api.csq.io |
