Skip to content

Commit

Permalink
docs: projects.md to include type information
Browse files Browse the repository at this point in the history
  • Loading branch information
atomicpages authored Jan 8, 2024
1 parent 13e3735 commit 50198cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ A project can define a `react-native.config.js` at the root with custom configur
For example, below configuration informs CLI about a source directory with iOS files.

```js
/** @type import("@react-native-community/cli-types").Config */
module.exports = {
project: {
ios: {
Expand All @@ -27,6 +28,7 @@ You can check all available options below.
## Project interface

```ts
// referenced from @react-native-community/cli-types
type ProjectConfigT = {
reactNativePath: ?string;
project: {
Expand Down Expand Up @@ -62,6 +64,7 @@ In most cases, as a React Native developer, you should not need to define any of
The following settings are available on iOS and Android:

```ts
// referenced from @react-native-community/cli-types
type IOSProjectParams = {
sourceDir?: string;
watchModeCommandParams?: string[];
Expand Down Expand Up @@ -163,6 +166,7 @@ Dependencies is a map where key is the name of the dependency and value is an ob
For example, you could set:

```js
/** @type import("@react-native-community/cli-types").Config */
module.exports = {
dependencies: {
'react-native-webview': {
Expand All @@ -179,6 +183,7 @@ in order to disable linking of React Native WebView on iOS.
or you could set:

```js
/** @type import("@react-native-community/cli-types").Config */
module.exports = {
dependencies: {
'react-native-brownfield': {
Expand All @@ -198,6 +203,7 @@ in order to use something else than `implementation` _(default scope method)_
Another use-case would be supporting local libraries that are not discoverable for autolinking, since they're not part of your `dependencies` or `devDependencies`:

```js
/** @type import("@react-native-community/cli-types").Config */
module.exports = {
dependencies: {
'local-rn-library': {
Expand Down

0 comments on commit 50198cd

Please sign in to comment.