🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-rename

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-rename - npm Package Compare versions

Comparing version

to
2.5.0

package-lock.json

2

lib/config/foldersAndFiles.js

@@ -14,3 +14,3 @@ 'use strict';

return ['ios/' + nS_CurrentAppName, 'ios/' + nS_CurrentAppName + '-tvOS', 'ios/' + nS_CurrentAppName + '-tvOSTests', 'ios/' + nS_CurrentAppName + '.xcodeproj', 'ios/' + nS_NewName + '.xcodeproj/xcshareddata/xcschemes/' + nS_CurrentAppName + '-tvOS.xcscheme', 'ios/' + nS_NewName + '.xcodeproj/xcshareddata/xcschemes/' + nS_CurrentAppName + '.xcscheme', 'ios/' + nS_CurrentAppName + 'Tests', 'ios/' + nS_NewName + 'Tests/' + nS_CurrentAppName + 'Tests.m', 'ios/' + nS_CurrentAppName + '.xcworkspace', 'ios/' + nS_NewName + '/' + nS_CurrentAppName + '.entitlements'];
return ['ios/' + nS_CurrentAppName, 'ios/' + nS_CurrentAppName + '-tvOS', 'ios/' + nS_CurrentAppName + '-tvOSTests', 'ios/' + nS_CurrentAppName + '.xcodeproj', 'ios/' + nS_NewName + '.xcodeproj/xcshareddata/xcschemes/' + nS_CurrentAppName + '-tvOS.xcscheme', 'ios/' + nS_NewName + '.xcodeproj/xcshareddata/xcschemes/' + nS_CurrentAppName + '.xcscheme', 'ios/' + nS_CurrentAppName + 'Tests', 'ios/' + nS_NewName + 'Tests/' + nS_CurrentAppName + 'Tests.m', 'ios/' + nS_CurrentAppName + '.xcworkspace', 'ios/' + nS_NewName + '/' + nS_CurrentAppName + '.entitlements', 'ios/' + nS_CurrentAppName + '-Bridging-Header.h'];
}

@@ -120,5 +120,10 @@ #!/usr/bin/env node

readFile(_path2.default.join(__dirname, 'android/app/src/main/res/values/strings.xml')).then(function (data) {
var $ = _cheerio2.default.load(data);
var currentAppName = $('string[name=app_name]').text();
var loadAppConfig = function loadAppConfig() {
return readFile(_path2.default.join(__dirname, 'app.json')).then(function (data) {
return JSON.parse(data);
});
};
loadAppConfig().then(function (appConfig) {
var currentAppName = appConfig.name;
var nS_CurrentAppName = currentAppName.replace(/\s/g, '');

@@ -139,3 +144,9 @@ var lC_Ns_CurrentAppName = nS_CurrentAppName.toLowerCase();

var id = bundleID.split('.');
if (id.length < 2) return console.log('Invalid Bundle Identifier. Add something like "com.travelapp" or "com.junedomingo.travelapp"');
var validBundleID = /^([A-Za-z]([0-9A-Z_a-z])*\.)+[A-Za-z]([0-9A-Z_a-z])*$/;
if (id.length < 2) {
return console.log('Invalid Bundle Identifier. Add something like "com.travelapp" or "com.junedomingo.travelapp"');
}
if (!validBundleID.test(bundleID)) {
return console.log('Invalid Bundle Identifier. It must have at least two segments (one or more dots). Each segment must start with a letter. All characters must be alphanumeric or an underscore [a-zA-Z0-9_]');
}
}

@@ -142,0 +153,0 @@

{
"name": "react-native-rename",
"version": "2.4.1",
"version": "2.5.0",
"description": "Rename react-native app with just one command",

@@ -49,3 +49,3 @@ "main": "lib/index.js",

"node-replace": "^0.3.3",
"shelljs": "^0.7.7"
"shelljs": "^0.8.4"
},

@@ -52,0 +52,0 @@ "babel": {

@@ -11,35 +11,38 @@ # react-native-rename [![NPM version](https://img.shields.io/npm/v/react-native-rename.svg?style=flat)](https://www.npmjs.com/package/react-native-rename) [![NPM monthly downloads](https://img.shields.io/npm/dm/react-native-rename.svg?style=flat)](https://npm-stat.com/charts.html?package=react-native-rename) [![NPM total downloads](https://img.shields.io/npm/dt/react-native-rename.svg?style=flat)](https://npm-stat.com/charts.html?package=react-native-rename) [![Paypal Donate](https://img.shields.io/badge/paypal-donate-green.svg?style=flat)](https://www.paypal.me/junedomingo)

#### Installation
### Usage
```
yarn global add react-native-rename
or
npm install react-native-rename -g
$ npx react-native-rename <newName>
```
Switch to new branch first
> better to have back-up
> With custom Bundle Identifier (Android only. For iOS, please use Xcode)
```
git checkout -b rename-app
$ npx react-native-rename <newName> -b <bundleIdentifier>
```
#### Usage
### Example
##### First, Switch to new branch (optional but recommended)
```
react-native-rename <newName>
$ git checkout -b rename-app
```
> With custom Bundle Identifier (Android only. For iOS, please use Xcode)
##### Then, Rename your app
```
react-native-rename <newName> -b <bundleIdentifier>
$ npx react-native-rename "Travel App"
```
> With custom Bundle Identifier
```
$ npx react-native-rename "Travel App" -b com.junedomingo.travelapp
```
#### Example
### Local installation
With **Yarn**:
```
react-native-rename "Travel App"
$ yarn global add react-native-rename
```
> With custom Bundle Identifier
With **npm**:
```
react-native-rename "Travel App" -b com.junedomingo.travelapp
$ npm install react-native-rename -g
```
### Support
<a href="https://www.buymeacoffee.com/junedomingo"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" target="_blank"></a>