hotwire-native-dev-tools 0.1.0-rc.0 → 0.1.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -4
  2. package/package.json +10 -2
package/README.md CHANGED
@@ -26,7 +26,7 @@ import { setupDevTools } from 'hotwire-native-dev-tools';
26
26
  setupDevTools();
27
27
  ```
28
28
 
29
- However, since you probably want to use the dev tools only in mobile app development, **the recommend approach is to create a custom entrypoint** which you can load only when needed.
29
+ However, since you probably want to use the dev tools only during mobile app development, **the recommended approach is to create a custom entrypoint** that you load only when needed.
30
30
 
31
31
  **Example Rails + Vite:**
32
32
 
@@ -45,6 +45,9 @@ import { setupDevTools } from 'hotwire-native-dev-tools';
45
45
  setupDevTools();
46
46
  ```
47
47
 
48
+ Please note, for best results, you should place the `vite_javascript_tag` before the `vite_javascript_tag` for your main app entrypoint.
49
+ This way, you'll minimize the chances of missing console logs or bridge messages that are sent before the dev tools are initialized.
50
+
48
51
  ---
49
52
 
50
53
  Alternatively, you could use a JS condition to check if the dev tools should be loaded:
@@ -56,13 +59,13 @@ setupDevTools({
56
59
  });
57
60
  ```
58
61
 
59
- Plase note that your JS condition may vary depending on your setup and needs.
60
- The downside of this approach is, that you ship the JS code of the dev tools to the client, even if the client is not in development mode.
62
+ Please note that your JS condition may vary depending on your setup and needs.
63
+ The downside of this approach is that you ship the JS code of the dev tools to the client, even if the client is not in development mode.
61
64
  This dev tools package is quite small (~15kb), but if you want to avoid shipping unnecessary code to the client, you should use the custom entrypoint approach.
62
65
 
63
66
  ## How to use (Native)
64
67
 
65
- Some features like the **Native Stack** and **PathConfiguration properties** are only available, if you add the dev tool bridge components to your app:
68
+ Some features, such as the Native Stack and PathConfiguration properties, are only available if you add the dev tool bridge components to your app:
66
69
 
67
70
  ### iOS
68
71
 
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "hotwire-native-dev-tools",
3
- "version": "0.1.0-rc.0",
3
+ "version": "0.1.0-rc.1",
4
4
  "description": "Dev Tools for Hotwire Native",
5
- "module": "dist/hotwire-native-dev-tools.es.js",
5
+ "main": "./dist/hotwire-native-dev-tools.es.js",
6
+ "module": "./dist/hotwire-native-dev-tools.es.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/hotwire-native-dev-tools.es.js",
11
+ "require": "./dist/hotwire-native-dev-tools.es.js"
12
+ }
13
+ },
6
14
  "type": "module",
7
15
  "files": [
8
16
  "dist",