Skip to content

Commit f44f38d

Browse files
authored
feat: rename to inspector (#10)
* feat: rename to inspector * fix: typo * chore: copy README as prepack
1 parent f81bdd6 commit f44f38d

44 files changed

Lines changed: 187 additions & 190 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Feature Request 💡
4-
url: https://github.com/callstackincubator/react-native-release-inspector/discussions/new?category=ideas
4+
url: https://github.com/callstackincubator/inspector/discussions/new?category=ideas
55
about: If you have a feature request, please create a new discussion on GitHub.
66
- name: Discussions on GitHub 💬
7-
url: https://github.com/callstackincubator/react-native-release-inspector/discussions
7+
url: https://github.com/callstackincubator/inspector/discussions
88
about: If this library works as promised but you need help, please ask questions there.

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We want this community to be friendly and respectful to each other. Please follo
88

99
This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/features/workspaces). It contains the following packages:
1010

11-
- The library package in `packages/react-native-release-inspector`.
11+
- The library package in `packages/inspector`.
1212
- An example app in `apps/example`.
1313

1414
To get started with the project, make sure you have the correct version of [Node.js](https://nodejs.org/) installed. See the [`.nvmrc`](./.nvmrc) file for the version used in this project.
@@ -25,9 +25,9 @@ The [example app](/apps/example/) demonstrates usage of the library. You need to
2525

2626
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
2727

28-
If you want to use Android Studio or Xcode to edit the native code, you can open the `apps/example/android` or `apps/example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `apps/example/ios/ReleaseInspectorExample.xcworkspace` in Xcode and find the source files at `Pods > Development Pods > react-native-release-inspector`.
28+
If you want to use Android Studio or Xcode to edit the native code, you can open the `apps/example/android` or `apps/example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `apps/example/ios/InspectorExample.xcworkspace` in Xcode and find the source files at `Pods > Development Pods > inspector`.
2929

30-
To edit the Java or Kotlin files, open `apps/example/android` in Android studio and find the source files at `react-native-release-inspector` under `Android`.
30+
To edit the Java or Kotlin files, open `apps/example/android` in Android studio and find the source files at `inspector` under `Android`.
3131

3232
You can use various commands from the root directory to work with the project.
3333

@@ -52,7 +52,7 @@ yarn example ios
5252
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
5353

5454
```sh
55-
Running "ReleaseInspectorExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
55+
Running "InspectorExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
5656
```
5757

5858
Note the `"fabric":true` and `"concurrentRoot":true` properties.

README.md

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=react-native-release-inspector" align="center">
1+
<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=inspector" align="center">
22
<picture>
3-
<img alt="react-native-release-inspector" src="./docs/assets/banner.png">
3+
<img alt="inspector" src="./docs/assets/banner.png">
44
</picture>
55
</a>
66

@@ -12,15 +12,15 @@
1212

1313
---
1414

15-
# react-native-release-inspector
15+
# inspector
1616

1717
The React on Web allows the users to run [profilable](https://react.dev/reference/dev-tools/react-performance-tracks#using-profiling-builds) builds to get near to production experience. This is the sweetest spot to having more confident profiling. However, on React Native this wasn't possible until now.
1818

1919
This package fixes this gap following the same analogy from React on Web, by allowing React Native to load Profiling shim for Release builds. 🚀
2020

2121
## Demo
2222

23-
![release-inspector](./docs/assets/inspector.gif)
23+
![inspector](./docs/assets/inspector.gif)
2424

2525
<hr/>
2626

@@ -51,7 +51,7 @@ function onRender(id, phase, actualDuration, baseDuration, startTime, commitTime
5151
## Installation
5252

5353
```sh
54-
npm install @callstack/react-native-release-inspector
54+
npm install @callstack/inspector
5555
```
5656

5757
#### Additional For Expo:
@@ -66,7 +66,7 @@ npm install --dev @react-native/metro-config@YOUR_RN_VERSION
6666
Add this to the top level of `index.js`:
6767

6868
```diff
69-
+import '@callstack/react-native-release-inspector';
69+
+import '@callstack/inspector';
7070
import { AppRegistry } from 'react-native';
7171
```
7272

@@ -77,7 +77,7 @@ import { AppRegistry } from 'react-native';
7777

7878
- Create an `entry.tsx` file, if you don't have it already:
7979
```tsx
80-
import "@callstack/react-native-release-inspector";
80+
import "@callstack/inspector";
8181
import { ExpoRoot } from "expo-router";
8282
import { AppRegistry } from "react-native";
8383

@@ -88,7 +88,7 @@ function App() {
8888

8989
AppRegistry.registerComponent("main", () => App);
9090
```
91-
> This is required to allow importing `@callstack/react-native-release-inspector` as the first module
91+
> This is required to allow importing `@callstack/inspector` as the first module
9292
9393

9494
- Update `package.json` to reflect this entry file:
@@ -120,12 +120,10 @@ module.exports = config;
120120
121121
<hr/>
122122

123-
Update your `metro.config` with `withReactNativeReleaseInspector`:
123+
Update your `metro.config` with `withInspector`:
124124

125125
```diff
126-
+const {
127-
+ withReactNativeReleaseInspector,
128-
+} = require('@callstack/react-native-release-inspector/metro');
126+
+const { withInspector } = require('@callstack/inspector/metro');
129127

130128
const root = path.resolve(__dirname, '../..');
131129

@@ -134,7 +132,7 @@ const config = withMetroConfig(getDefaultConfig(__dirname), {
134132
dirname: __dirname,
135133
});
136134

137-
+module.exports = withReactNativeReleaseInspector(config, true);
135+
+module.exports = withInspector(config, true);
138136
```
139137

140138
#### Step 3:
@@ -158,9 +156,9 @@ Now build and run your app in release mode, you should see the react devtools co
158156

159157
### API
160158

161-
The `@callstack/react-native-release-inspector` requires the user to configure their `metro.config` as shown above. This `withReactNativeReleaseInspector` receives the following arguments:
159+
The `@callstack/inspector` requires the user to configure their `metro.config` as shown above. This `withInspector` receives the following arguments:
162160

163-
- `withReactNativeReleaseInspector(config, enabled)`
161+
- `withInspector(config, enabled)`
164162
- `config: MetroConfig`
165163
- User only need to pass the config instance from Metro
166164
- `enabled: Boolean`
@@ -169,7 +167,7 @@ The `@callstack/react-native-release-inspector` requires the user to configure t
169167

170168
### CLI
171169

172-
The `@callstack/react-native-release-inspector` exposes a CLI `inspector` to start the instance of React DevTools.
170+
The `@callstack/inspector` exposes a CLI `inspector` to start the instance of React DevTools.
173171

174172
It supports the following options:
175173

@@ -181,9 +179,9 @@ It supports the following options:
181179
Sample Usages:
182180

183181
```bash
184-
yarn inspector start
185-
yarn inspector help
186-
yarn inspector -h
182+
npx inspector start
183+
npx inspector help
184+
npx inspector -h
187185
```
188186
<hr/>
189187

@@ -195,7 +193,7 @@ yarn inspector -h
195193

196194
## Made with ❤️ at Callstack
197195

198-
**react-native-release-inspector** is an open source project and will always remain free to use. If you think it's cool, please star it 🌟.
196+
**inspector** is an open source project and will always remain free to use. If you think it's cool, please star it 🌟.
199197

200198
[Callstack](https://www.callstack.com/) is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
201199

@@ -207,9 +205,9 @@ Made with [create-react-native-library](https://github.com/callstack/react-nativ
207205

208206
MIT
209207

210-
[license-badge]: https://img.shields.io/npm/l/react-native-release-inspector?style=for-the-badge
211-
[license]: https://github.com/callstackincubator/react-native-release-inspector/blob/main/LICENSE
212-
[npm-downloads-badge]: https://img.shields.io/npm/dm/react-native-release-inspector?style=for-the-badge
213-
[npm-downloads]: https://www.npmjs.com/package/react-native-release-inspector
208+
[license-badge]: https://img.shields.io/npm/l/@callstack/inspector?style=for-the-badge
209+
[license]: https://github.com/callstackincubator/inspector/blob/main/LICENSE
210+
[npm-downloads-badge]: https://img.shields.io/npm/dm/@callstack/inspector?style=for-the-badge
211+
[npm-downloads]: https://www.npmjs.com/package/@callstack/inspector
214212
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
215-
[prs-welcome]: https://github.com/callstackincubator/react-native-release-inspector
213+
[prs-welcome]: https://github.com/callstackincubator/inspector

apps/example/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ android {
7777
buildToolsVersion rootProject.ext.buildToolsVersion
7878
compileSdk rootProject.ext.compileSdkVersion
7979

80-
namespace "releaseinspector.example"
80+
namespace "inspector.example"
8181
defaultConfig {
82-
applicationId "releaseinspector.example"
82+
applicationId "inspector.example"
8383
minSdkVersion rootProject.ext.minSdkVersion
8484
targetSdkVersion rootProject.ext.targetSdkVersion
8585
versionCode 1

apps/example/android/app/src/main/java/releaseinspector/example/MainActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package releaseinspector.example
1+
package inspector.example
22

33
import com.facebook.react.ReactActivity
44
import com.facebook.react.ReactActivityDelegate
@@ -11,7 +11,7 @@ class MainActivity : ReactActivity() {
1111
* Returns the name of the main component registered from JavaScript. This is used to schedule
1212
* rendering of the component.
1313
*/
14-
override fun getMainComponentName(): String = "ReleaseInspectorExample"
14+
override fun getMainComponentName(): String = "InspectorExample"
1515

1616
/**
1717
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]

apps/example/android/app/src/main/java/releaseinspector/example/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package releaseinspector.example
1+
package inspector.example
22

33
import android.app.Application
44
import com.facebook.react.PackageList
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">ReleaseInspectorExample</string>
2+
<string name="app_name">InspectorExample</string>
33
</resources>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
22
plugins { id("com.facebook.react.settings") }
33
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
4-
rootProject.name = 'releaseinspector.example'
4+
rootProject.name = 'inspector.example'
55
include ':app'
66
includeBuild('../node_modules/@react-native/gradle-plugin')

apps/example/app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "ReleaseInspectorExample",
3-
"displayName": "ReleaseInspectorExample"
2+
"name": "InspectorExample",
3+
"displayName": "InspectorExample"
44
}

apps/example/babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module.exports = {
55
'module-resolver',
66
{
77
alias: {
8-
'@callstack/react-native-release-inspector':
9-
'../../packages/react-native-release-inspector/src',
8+
'@callstack/inspector':
9+
'../../packages/inspector/src',
1010
},
1111
},
1212
],

0 commit comments

Comments
 (0)